[HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit

This commit is contained in:
Robin Chalas 2019-11-18 00:27:40 +01:00
parent 76d3112d8e
commit aab9b43d03
1 changed files with 1 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class ErrorListener implements EventSubscriberInterface
$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;
@ -54,7 +54,6 @@ class ErrorListener implements EventSubscriberInterface
$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);