summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-06-04 19:02:38 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-06-04 19:02:38 +0000
commit949d4d956a7bbabd10b5b865f9d8e5cbc96bb5a1 (patch)
tree5693e83a59d64ba8df3b7896dc5e5b089f40b548
parentd3de63cac5d792baf607bb247d0bc8cdd31dcf26 (diff)
downloadbrdo-949d4d956a7bbabd10b5b865f9d8e5cbc96bb5a1.tar.gz
brdo-949d4d956a7bbabd10b5b865f9d8e5cbc96bb5a1.tar.bz2
- Modified error_handler() to ignore errors when @function() is used to
suppress errors. If ya suppress them you normally have a good reason to do so :-)
-rw-r--r--includes/common.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index fcb93c618..581ab3558 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -12,7 +12,7 @@ function conf_init() {
function error_handler($errno, $message, $filename, $line, $variables) {
$types = array(1 => "error", 2 => "warning", 4 => "parse error", 8 => "notice", 16 => "core error", 32 => "core warning", 64 => "compile error", 128 => "compile warning", 256 => "user error", 512 => "user warning", 1024 => "user notice");
$entry = $types[$errno] .": $message in $filename on line $line.";
- if ($errno == 1 || $errno == 2 || $errno == 4) {
+ if (($errno == 1 || $errno == 2 || $errno == 4) && error_reporting()) {
watchdog("error", $types[$errno] .": $message in $filename on line $line.");
print $entry;
}