Skip to content

Commit 0096449

Browse files
fancywebnicolas-grekas
authored andcommitted
[Console] Keep the modified exception handler
1 parent 3fa1ad9 commit 0096449

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/Console/Application.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,10 @@ public function run(InputInterface $input = null, OutputInterface $output = null
171171
}
172172
restore_exception_handler();
173173
} elseif (!$debugHandler) {
174-
$phpHandler[0]->setExceptionHandler(null);
174+
$finalHandler = $phpHandler[0]->setExceptionHandler(null);
175+
if ($finalHandler !== $renderException) {
176+
$phpHandler[0]->setExceptionHandler($finalHandler);
177+
}
175178
}
176179
}
177180

0 commit comments

Comments
 (0)