bug #32464 [WebProfilerBundle] Fix Twig 1.x compatibility (yceruto)

This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Fix Twig 1.x compatibility

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | not needed

Commits
-------

a9a6eb5c58 Fix Twig 1.x compatibility
This commit is contained in:
Fabien Potencier 2019-07-09 20:26:56 +02:00
commit 0349294175
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class ExceptionController
$exception = $this->profiler->loadProfile($token)->getCollector('exception')->getException();
$template = $this->getTemplate();
if (!$this->twig->getLoader()->exists($template)) {
if (!$this->templateExists($template)) {
$handler = new ExceptionHandler($this->debug, $this->twig->getCharset(), $this->fileLinkFormat);
return new Response($handler->getContent($exception), 200, ['Content-Type' => 'text/html']);