bug #15000 [2.3][Debug] Fix fatal-errors handling on HHVM (nicolas-grekas)
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Debug] Fix fatal-errors handling on HHVM
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14967
| License | MIT
| Doc PR | -
Commits
-------
d29bfdc
[2.3][Debug] Fix fatal-errors handling on HHVM
This commit is contained in:
commit
17ffb5a81a
@ -133,6 +133,7 @@ class ErrorHandler
|
|||||||
unset($context['GLOBALS']);
|
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);
|
$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
|
// Exceptions thrown from error handlers are sometimes not caught by the exception
|
||||||
@ -173,7 +174,7 @@ class ErrorHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->reservedMemory = '';
|
$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))) {
|
if (0 === $this->level || !in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user