if ($cli) {
echo "ERROR: " .$str . "\n"; // print the error first, as DB might fail..
}
+ $pman = HTML_FlexyFramework::get();
- if ($type !== false) {
+ if ($type !== false && empty($pman->nodatabase)) {
if(!empty($errors)){
DB_DataObject::factory('Events')->writeEventLogExtra($errors);
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);