- 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 :-)
3-00
Kjartan Mannes 2001-06-04 19:02:38 +00:00
parent d3de63cac5
commit 949d4d956a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}