8000 bug #15000 [2.3][Debug] Fix fatal-errors handling on HHVM (nicolas-gr… · symfony/symfony@17ffb5a · GitHub
[go: up one dir, main page]

Skip to content

Commit 17ffb5a

Browse files
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
2 parents 287a577 + d29bfdc commit 17ffb5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ function ($row) {
133133
unset($context['GLOBALS']);
134134
}
135135

136+
$level &= E_ALL | E_STRICT;
136137
$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);
137138

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

175176
$this->reservedMemory = '';
176-
$type = $error['type'];
177+
$type = $error['type'] & (E_ALL | E_STRICT);
177178
if (0 === $this->level || !in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) {
178179
return;
179180
}

0 commit comments

Comments
 (0)
0