fix #7802 - read only db trying to write to DB
authorAlan <alan@roojs.com>
Wed, 6 Sep 2023 02:44:03 +0000 (10:44 +0800)
committerAlan <alan@roojs.com>
Wed, 6 Sep 2023 02:44:03 +0000 (10:44 +0800)
Pman.php

index 277bf4b..ddbb4ae 100644 (file)
--- a/Pman.php
+++ b/Pman.php
@@ -1145,7 +1145,9 @@ class Pman extends HTML_FlexyFramework_Page
     function addEvent($act, $obj = false, $remarks = '') 
     {
         
-        if (!empty(HTML_FlexyFramework::get()->Pman['disable_events'])) {
+        if (!empty(HTML_FlexyFramework::get()->Pman['disable_events'])
+         || !empty(HTML_FlexyFramework::get()->database_is_readonly)
+        ) {
             $str = $obj !== false ? "{$obj->tableName()}:{$obj->id} " : '';
             $de = ini_set('display_errors', 0);
             trigger_error("$act {$str}{$remarks}" , E_USER_NOTICE);