mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
remove retarded use of numbers (REALLY bad idea) for error handling, add check for E_STRICT and ignore all of those errors
This commit is contained in:
parent
b766beaac9
commit
b1362a53ab
1 changed files with 12 additions and 12 deletions
|
@ -265,21 +265,21 @@ function cmdHelp($command)
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
function error_handler($errno, $errmsg, $file, $line, $vars) {
|
function error_handler($errno, $errmsg, $file, $line, $vars) {
|
||||||
if (error_reporting() == 0) {
|
if (error_reporting() == 0 || ($errno & E_STRICT)) {
|
||||||
return; // @silenced error
|
return; // @silenced error
|
||||||
}
|
}
|
||||||
$errortype = array (
|
$errortype = array (
|
||||||
1 => "Error",
|
E_ERROR => "Error",
|
||||||
2 => "Warning",
|
E_WARNING => "Warning",
|
||||||
4 => "Parsing Error",
|
E_PARSE => "Parsing Error",
|
||||||
8 => "Notice",
|
E_NOTICE => "Notice",
|
||||||
16 => "Core Error",
|
E_CORE_ERROR => "Core Error",
|
||||||
32 => "Core Warning",
|
E_CORE_WARNING => "Core Warning",
|
||||||
64 => "Compile Error",
|
E_COMPILE_ERROR => "Compile Error",
|
||||||
128 => "Compile Warning",
|
E_COMPILE_WARNING => "Compile Warning",
|
||||||
256 => "User Error",
|
E_USER_ERROR => "User Error",
|
||||||
512 => "User Warning",
|
E_USER_WARNING => "User Warning",
|
||||||
1024=> "User Notice"
|
E_USER_NOTICE => "User Notice"
|
||||||
);
|
);
|
||||||
$prefix = $errortype[$errno];
|
$prefix = $errortype[$errno];
|
||||||
$file = basename($file);
|
$file = basename($file);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue