Commit 926fce07 authored by Nigel McNie's avatar Nigel McNie
Browse files

Only add E_RECOVERABLE_ERROR to the list of errors for PHPs that define it.



This will prevent notices every request on PHP 5.1.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 6c7360d3
......@@ -406,7 +406,6 @@ function error ($code, $message, $file, $line, $vars) {
static $error_lookup = array(
E_NOTICE => 'Notice',
E_WARNING => 'Warning',
E_RECOVERABLE_ERROR => 'Warning',
// Not sure if these ever get handled here
E_ERROR => 'Error',
// These three are not used by this application but may be used by third parties
......@@ -415,6 +414,10 @@ function error ($code, $message, $file, $line, $vars) {
E_USER_ERROR => 'User Error'
);
if (defined('E_RECOVERABLE_ERROR')) {
$error_lookup[E_RECOVERABLE_ERROR] = 'Warning';
}
if (!error_reporting()) {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment