8000 Revert "bug #25829 [Debug] Always decorate existing exception handler… · symfony/symfony@b6fc69e · GitHub
[go: up one dir, main page]

Skip to content

Commit b6fc69e

Browse files
Revert "bug #25829 [Debug] Always decorate existing exception handlers to deal with fatal errors (nicolas-grekas)"
This reverts commit 78a8a63, reversing changes made to 5d39415.
1 parent 74d53fd commit b6fc69e

File tree

2 files changed

+3
-53
lines changed

2 files changed

+3
-53
lines changed

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,10 @@ public static function register($handler = null, $replace = true)
147147
$handler = $prev[0];
148148
$replace = false;
149149
}
150-
if (!$replace && $prev) {
151-
restore_error_handler();
152-
}
153-
if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] === $handler) {
154-
restore_exception_handler();
150+
if ($replace || !$prev) {
151+
$handler->setExceptionHandler(set_exception_handler(array($handler, 'handleException')));
155152
} else {
156-
$handler->setExceptionHandler($prev);
153+
restore_error_handler();
157154
}
158155

159156
$handler-> 52FF throwAt($levels & $handler->thrownErrors, true);

src/Symfony/Component/Debug/Tests/phpt/decorate_exception_hander.phpt

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0