Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 24c5ba4

Browse filesBrowse files
megazollfabpot
authored andcommitted
Use request format from request in twig ExceptionController
1 parent 6ad5d31 commit 24c5ba4
Copy full SHA for 24c5ba4

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ public function __construct(\Twig_Environment $twig, $debug)
3939
* @param Request $request The request
4040
* @param FlattenException $exception A FlattenException instance
4141
* @param DebugLoggerInterface $logger A DebugLoggerInterface instance
42-
* @param string $_format The format to use for rendering (html, xml, ...)
4342
*
4443
* @return Response
4544
*
4645
* @throws \InvalidArgumentException When the exception template does not exist
4746
*/
48-
public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null, $_format = 'html')
47+
public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null)
4948
{
5049
$currentContent = $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1));
5150

5251
$code = $exception->getStatusCode();
5352

5453
return new Response($this->twig->render(
55-
$this->findTemplate($request, $_format, $code, $this->debug),
54+
$this->findTemplate($request, $request->getRequestFormat(), $code, $this->debug),
5655
array(
5756
'status_code' => $code,
5857
'status_text' => isset(Response::$statusTexts[$code]) ? Response::$statusTexts[$code] : '',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.