Skip to content

Commit 6cb4a21

Browse files
[HttpKernel][FrameworkBundle] fix compat with Debug component
1 parent bce6f33 commit 6cb4a21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

EventListener/DebugHandlersListener.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\ConsoleEvents;
1616
use Symfony\Component\Console\Event\ConsoleEvent;
1717
use Symfony\Component\Console\Output\ConsoleOutputInterface;
18+
use Symfony\Component\Debug\ErrorHandler as LegacyErrorHandler;
1819
use Symfony\Component\Debug\Exception\FatalThrowableError;
1920
use Symfony\Component\ErrorHandler\ErrorHandler;
2021
use Symfony\Component\EventDispatcher\Event;
@@ -79,7 +80,7 @@ public function configure(Event $event = null)
7980
restore_exception_handler();
8081

8182
if ($this->logger || null !== $this->throwAt) {
82-
if ($handler instanceof ErrorHandler) {
83+
if ($handler instanceof ErrorHandler || $handler instanceof LegacyErrorHandler) {
8384
if ($this->logger) {
8485
$handler->setDefaultLogger($this->logger, $this->levels);
8586
if (\is_array($this->levels)) {
@@ -138,7 +139,7 @@ public function configure(Event $event = null)
138139
}
139140
}
140141
if ($this->exceptionHandler) {
141-
if ($handler instanceof ErrorHandler) {
142+
if ($handler instanceof ErrorHandler || $handler instanceof LegacyErrorHandler) {
142143
$handler->setExceptionHandler($this->exceptionHandler);
143144
}
144145
$this->exceptionHandler = null;

0 commit comments

Comments
 (0)