Skip to content

Commit

Permalink
Fix PhpConsole\Handler::setErrorsHandlerLevel() for some PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
barbushin committed Oct 29, 2015
1 parent 6691f96 commit 50236f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpConsole/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function checkFatalErrorOnShutDown() {
* @param int|array $ignoreTraceCalls Ignore tracing classes by name prefix `array('PhpConsole')` or fixed number of calls to ignore
*/
public function handleError($code = null, $text = null, $file = null, $line = null, $context = null, $ignoreTraceCalls = 0) {
if(!$this->isStarted || error_reporting() === 0 || $this->isHandlingDisabled()) {
if(!$this->isStarted || error_reporting() === 0 || $this->isHandlingDisabled() || ($this->errorsHandlerLevel && !($code & $this->errorsHandlerLevel))) {
return;
}
$this->onHandlingStart();
Expand Down

0 comments on commit 50236f7

Please sign in to comment.