From d29bfdcc3135e63192e2e34540a16e2f7d546beb Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 16 Jun 2015 14:17:21 +0200 Subject: [PATCH] [2.3][Debug] Fix fatal-errors handling on HHVM --- src/Symfony/Component/Debug/ErrorHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index 156552384353..43e196242a7e 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -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 @@ -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; }