Skip to content

Commit

Permalink
[HttpKernel] Make ErrorListener::onKernelException()'s dispatcher arg…
Browse files Browse the repository at this point in the history
…ument explicit
  • Loading branch information
Robin Chalas committed Nov 17, 2019
1 parent 76d3112 commit aab9b43
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -46,15 +46,14 @@ public function logKernelException(ExceptionEvent $event)
$this->logException($event->getThrowable(), sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()));
}

public function onKernelException(ExceptionEvent $event)
public function onKernelException(ExceptionEvent $event, string $eventName = null, EventDispatcherInterface $eventDispatcher = null)
{
if (null === $this->controller) {
return;
}

$exception = $event->getThrowable();
$request = $this->duplicateRequest($exception, $event->getRequest());
$eventDispatcher = \func_num_args() > 2 ? func_get_arg(2) : null;

try {
$response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false);
Expand Down

0 comments on commit aab9b43

Please sign in to comment.