X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ferrors.inc;h=86bfac2b0cd3fee9641c0c8bc188a2041e103a61;hb=0b63d898491b6577a5a5bf90e771dca0dcbbcf1f;hp=8b02f299148413e691d530427361fcc3a0567fef;hpb=649c678c71f2827326c9761b0091bb15196f8878;p=fa-stable.git diff --git a/includes/errors.inc b/includes/errors.inc index 8b02f299..86bfac2b 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -195,10 +195,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; }