Skip to content

Commit e17c6c3

Browse files
[Debug] fix debug handlers config
1 parent e1ed127 commit e17c6c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

EventListener/DebugHandlersListener.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ public function __construct($exceptionHandler)
3434
public function configure()
3535
{
3636
if ($this->exceptionHandler) {
37-
$mainHandler = set_exception_handler('var_dump');
37+
$handler = set_exception_handler('var_dump');
38+
$handler = is_array($handler) ? $handler[0] : null;
3839
restore_exception_handler();
39-
if ($mainHandler instanceof ExceptionHandler) {
40-
$mainHandler->setHandler($this->exceptionHandler);
40+
if ($handler instanceof ExceptionHandler) {
41+
$handler->setHandler($this->exceptionHandler);
4142
}
4243
$this->exceptionHandler = null;
4344
}

0 commit comments

Comments
 (0)