Skip to content

Commit

Permalink
Handle recoverable errors as terminating errors
Browse files Browse the repository at this point in the history
Currently recoverable errors are handled in a way that means they don't cause the operation of the script to terminate, but the execution continues in spite of the error. This change makes it so a recoverable error is seen as a terminating error
  • Loading branch information
camspiers committed Feb 2, 2014
1 parent ebbb362 commit 03ead60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Camspiers/LoggerBridge/LoggerBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class LoggerBridge implements \RequestFilter
E_CORE_ERROR,
E_USER_ERROR,
E_PARSE,
E_COMPILE_ERROR
E_COMPILE_ERROR,
E_RECOVERABLE_ERROR
),
'warning' => array(
E_WARNING,
Expand Down Expand Up @@ -390,7 +391,7 @@ public function errorHandler($errno, $errstr, $errfile, $errline)
{
// Honour error suppression through @
if (($errorReporting = error_reporting()) === 0) {
return;
return true;
}

foreach ($this->errorLogGroups as $logType => $errorTypes) {
Expand Down Expand Up @@ -430,6 +431,9 @@ public function errorHandler($errno, $errstr, $errfile, $errline)
break;
}
}

// ignore the usually handling of this type of error
return true;
}

/**
Expand Down

0 comments on commit 03ead60

Please sign in to comment.