From 949d4d956a7bbabd10b5b865f9d8e5cbc96bb5a1 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Mon, 4 Jun 2001 19:02:38 +0000 Subject: [PATCH] - 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 :-) --- includes/common.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/common.inc b/includes/common.inc index fcb93c6183b..581ab3558da 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; }