X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ferrors.inc;h=e59e14b059294715b172ca9775ca010bd1320d8e;hb=3c1029028fe1864ce433cd4e06b8cd3a156da9c3;hp=08a5e5781f6b6e421e087181b0709df02723b08e;hpb=81dd5f392e49a94960c250053e375ed135ac9bad;p=fa-stable.git diff --git a/includes/errors.inc b/includes/errors.inc index 08a5e578..e59e14b0 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; }