mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 01:49:08 +01:00
LSlog: log PHP error suppressed with the @-operator at TRACE level and add a prefix to signal it
This commit is contained in:
parent
977dc8fcfa
commit
0e705852af
1 changed files with 12 additions and 1 deletions
|
@ -468,7 +468,18 @@ class LSlog {
|
||||||
);
|
);
|
||||||
$error = (isset($errnos2error[$errno])?$errnos2error[$errno]:'UNKNOWN');
|
$error = (isset($errnos2error[$errno])?$errnos2error[$errno]:'UNKNOWN');
|
||||||
$level = (isset($errors2level[$error])?$errors2level[$error]:'ERROR');
|
$level = (isset($errors2level[$error])?$errors2level[$error]:'ERROR');
|
||||||
self :: logging($level, "A PHP $error occured (#$errno) : $errstr [$errfile:$errline]");
|
|
||||||
|
// Log error suppressed with the @-operator at TRACE level and add a prefix to signal it
|
||||||
|
$prefix = "";
|
||||||
|
$error_reporting = error_reporting();
|
||||||
|
if ( !($error_reporting & $errno) ) {
|
||||||
|
$level = "TRACE";
|
||||||
|
$prefix = "[IGNORE BY @ OPERATOR] ";
|
||||||
|
}
|
||||||
|
self :: logging(
|
||||||
|
$level,
|
||||||
|
"{$prefix}A PHP $error occured (#$errno) : $errstr [$errfile:$errline]"
|
||||||
|
);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue