Skip to content

Commit cbc4efc

Browse files
[HttpKernel] fix leftover
1 parent fdb9181 commit cbc4efc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Symfony/Component/HttpKernel/Controller/ErrorController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public function __construct(HttpKernelInterface $kernel, $controller, ErrorRende
3737
$this->errorRenderer = $errorRenderer;
3838
}
3939

40-
public function __invoke(Request $request, FlattenException $e): Response
40+
public function __invoke(Request $request, FlattenException $exception): Response
4141
{
4242
try {
43-
return new Response($this->errorRenderer->render($e, $request->getPreferredFormat()), $e->getStatusCode(), $e->getHeaders());
43+
return new Response($this->errorRenderer->render($exception, $request->getPreferredFormat()), $exception->getStatusCode(), $exception->getHeaders());
4444
} catch (ErrorRendererNotFoundException $_) {
45-
return new Response($this->errorRenderer->render($e), $e->getStatusCode(), $e->getHeaders());
45+
return new Response($this->errorRenderer->render($exception), $exception->getStatusCode(), $exception->getHeaders());
4646
}
4747
}
4848

@@ -57,7 +57,7 @@ public function preview(Request $request, int $code): Response
5757
*/
5858
$subRequest = $request->duplicate(null, null, [
5959
'_controller' => $this->controller,
60-
'e' => $exception,
60+
'exception' => $exception,
6161
'logger' => null,
6262
'showException' => false,
6363
]);

src/Symfony/Component/HttpKernel/Tests/Controller/ErrorControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testPreviewController()
103103
->method('handle')
104104
->with(
105105
$this->callback(function (Request $request) use ($_controller, $code) {
106-
$exception = $request->attributes->get('e');
106+
$exception = $request->attributes->get('exception');
107107

108108
$this->assertSame($_controller, $request->attributes->get('_controller'));
109109
$this->assertInstanceOf(FlattenException::class, $exception);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy