Commit fc8b3015 authored by Taylor Otwell's avatar Taylor Otwell

Refactor the ignored error logging.

parent beb44eb4
......@@ -72,18 +72,17 @@ set_exception_handler(function($exception) use ($handler)
* errors are ignored and errors in the developer configured whitelist
* are silently logged.
*/
set_error_handler(function($number, $error, $file, $line) use ($logger)
set_error_handler(function($code, $error, $file, $line) use ($logger)
{
if (error_reporting() === 0)
{
return;
}
$exception = new \ErrorException($error, $number, 0, $file, $line);
if (in_array($number, Config::$items['error']['ignore']))
if (error_reporting() === 0) return;
$exception = new \ErrorException($error, $code, 0, $file, $line);
if (in_array($code, Config::$items['error']['ignore']))
{
$logger($exception);
return;
return $logger($exception);
}
throw $exception;
});
......
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