projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81dd5f3
)
Redirect all database errors to error log unless $go_debug is switched on.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Fri, 25 Apr 2014 22:12:09 +0000
(
00:12
+0200)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Wed, 21 May 2014 12:23:16 +0000
(14:23 +0200)
includes/errors.inc
patch
|
blob
|
history
diff --git
a/includes/errors.inc
b/includes/errors.inc
index 08a5e5781f6b6e421e087181b0709df02723b08e..e59e14b059294715b172ca9775ca010bd1320d8e 100644
(file)
--- a/
includes/errors.inc
+++ b/
includes/errors.inc
@@
-195,10
+195,14
@@
function display_db_error($msg, $sql_statement=null, $exit=true)
}
$str .= "<br><br>";
- 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;
}