We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fad59b3 commit 4a8a18eCopy full SHA for 4a8a18e
src/Symfony/Component/Debug/ErrorHandler.php
@@ -561,16 +561,22 @@ public static function handleFatalError(array $error = null)
561
562
$handler = self::$reservedMemory = null;
563
$handlers = array();
564
+ $previousHandler = null;
565
+ $previousHandlerLimit = 10;
566
567
while (!is_array($handler) || !$handler[0] instanceof self) {
568
$handler = set_exception_handler('var_dump');
569
restore_exception_handler();
570
571
+ if ($handler === $previousHandler && !--$previousHandlerLimit) {
572
+ $handler = null;
573
+ }
574
if (!$handler) {
575
break;
576
}
577
578
array_unshift($handlers, $handler);
579
+ $previousHandler = $handler;
580
581
foreach ($handlers as $h) {
582
set_exception_handler($h);
0 commit comments