8000 bug #12196 [TwigBundle] show correct fallback exception template in d… · symfony/symfony@b409b4b · GitHub
[go: up one dir, main page]

Skip to content

Commit b409b4b

Browse files
committed
bug #12196 [TwigBundle] show correct fallback exception template in debug mode (Tobion)
This PR was merged into the 2.3 branch. Discussion ---------- [TwigBundle] show correct fallback exception template in debug mode | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - In debug mode, the exception controller did not show the correct template in case the format is unknown. It falls back to html but the logic for `exception_full` was not applied there. So it was just returning the partial html. Commits ------- b97acd9 [TwigBundle] show correct fallback exception template in debug mode
2 parents 60d006d + b97acd9 commit b409b4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected function findTemplate(Request $request, $format, $code, $debug)
114114
// default to a generic HTML exception
115115
$request->setRequestFormat('html');
116116

117-
return new TemplateReference('TwigBundle', 'Exception', $name, 'html', 'twig');
117+
return new TemplateReference('TwigBundle', 'Exception', $debug ? 'exception_full' : $name, 'html', 'twig');
118118
}
119119

120120
// to be removed when the minimum required version of Twig is >= 2.0

0 commit comments

Comments
 (0)
0