Skip to content

Commit

Permalink
[2.3][Debug] Fix fatal-errors handling on HHVM
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 16, 2015
1 parent 287a577 commit d29bfdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Symfony/Component/Debug/ErrorHandler.php
Expand Up @@ -133,6 +133,7 @@ function ($row) {
unset($context['GLOBALS']);
}

$level &= E_ALL | E_STRICT;
$exception = new ContextErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line), 0, $level, $file, $line, $context);

// Exceptions thrown from error handlers are sometimes not caught by the exception
Expand Down Expand Up @@ -173,7 +174,7 @@ public function handleFatal()
}

$this->reservedMemory = '';
$type = $error['type'];
$type = $error['type'] & (E_ALL | E_STRICT);
if (0 === $this->level || !in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) {
return;
}
Expand Down

0 comments on commit d29bfdc

Please sign in to comment.