8000 minor #34430 [HttpKernel] Make ErrorListener::onKernelException()'s d… · symfony/symfony@4498e7e · GitHub
[go: up one dir, main page]

Skip to content

Commit 4498e7e

Browse files
minor #34430 [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit (chalasr)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - One less BC break for 5.0 Commits ------- aab9b43 [HttpKernel] Make ErrorListener::onKernelException()'s dispatcher argument explicit
2 parents 76d3112 + aab9b43 commit 4498e7e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ public function logKernelException(ExceptionEvent $event)
4646
$this->logException($event->getThrowable(), sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()));
4747
}
4848

49-
public function onKernelException(ExceptionEvent $event)
49+
public function onKernelException(ExceptionEvent $event, string $eventName = null, EventDispatcherInterface $eventDispatcher = null)
5050
{
5151
if (null === $this->controller) {
5252
return;
5353
}
5454

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

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

0 commit comments

Comments
 (0)
0