bug #23268 Show exception is checked twice in ExceptionController of twig (gmponos)

This PR was submitted for the 3.4 branch but it was merged into the 2.7 branch instead (closes #23268).

Discussion
----------

Show exception is checked twice in ExceptionController of twig

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | N/A

I think that the $showException variable is checked twice. Check line 105 of the same file. Hope I did not miss anythings since the tests are passing.

Commits
-------

a433ceca41 Show exception is checked twice in ExceptionController of twig
This commit is contained in:
Fabien Potencier 2017-06-22 16:15:44 -07:00
commit 9fc9cc4123

View File

@ -125,7 +125,7 @@ class ExceptionController
// default to a generic HTML exception
$request->setRequestFormat('html');
return new TemplateReference('TwigBundle', 'Exception', $showException ? 'exception_full' : $name, 'html', 'twig');
return new TemplateReference('TwigBundle', 'Exception', $name, 'html', 'twig');
}
// to be removed when the minimum required version of Twig is >= 3.0