Skip to content

Commit

Permalink
[Debug] fix debug handlers config
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 3, 2014
1 parent 315c3e5 commit e1ba70e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ public function __construct($exceptionHandler)
public function configure()
{
if ($this->exceptionHandler) {
$mainHandler = set_exception_handler('var_dump');
$handler = set_exception_handler('var_dump');
$handler = is_array($handler) ? $handler[0] : null;
restore_exception_handler();
if ($mainHandler instanceof ExceptionHandler) {
$mainHandler->setHandler($this->exceptionHandler);
if ($handler instanceof ExceptionHandler) {
$handler->setHandler($this->exceptionHandler);
}
$this->exceptionHandler = null;
}
Expand Down

0 comments on commit e1ba70e

Please sign in to comment.