X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Ferrors.inc;h=56574f32ab74fb0e862f3b1297046c22bcb76be9;hb=5d3d6f1dc8566693c006f4b01edb74f6f31334b5;hp=08a5e5781f6b6e421e087181b0709df02723b08e;hpb=c078c612309ab71d6873ad48629f9a269466ca51;p=fa-stable.git diff --git a/includes/errors.inc b/includes/errors.inc index 08a5e578..56574f32 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -62,7 +62,8 @@ function error_handler($errno, $errstr, $file, $line) { // Please use restrainedly to not risk loss of important messages $excluded_warnings = array( 'html_entity_decode', 'htmlspecialchars', // nevermind encodings, special chars are processed anyway - 'should be compatible with that' // ignore cpdf/frontreport wrapper warnings + 'should be compatible with that', // ignore cpdf/frontreport wrapper warnings + 'mysql extension is deprecated' // ignore strict warning in 5.4 ); foreach($excluded_warnings as $ref) { if (strpos($errstr, $ref) !== false) { @@ -195,10 +196,14 @@ function display_db_error($msg, $sql_statement=null, $exit=true) } $str .= "

"; - if($msg) - trigger_error($str, E_USER_ERROR); - else // $msg can be null here only in debug mode, otherwise the error is ignored - trigger_error($str, E_USER_WARNING); + if (!$go_debug) + error_log($str); + else { + if($msg) + trigger_error($str, E_USER_ERROR); + else // $msg can be null here only in debug mode, otherwise the error is ignored + trigger_error($str, E_USER_WARNING); + } if ($exit) exit; }