Fix Twig 1.x compatibility
This commit is contained in:
parent
1872a5af39
commit
a9a6eb5c58
@ -60,7 +60,7 @@ class ExceptionController
|
|||||||
$exception = $this->profiler->loadProfile($token)->getCollector('exception')->getException();
|
$exception = $this->profiler->loadProfile($token)->getCollector('exception')->getException();
|
||||||
$template = $this->getTemplate();
|
$template = $this->getTemplate();
|
||||||
|
|
||||||
if (!$this->twig->getLoader()->exists($template)) {
|
if (!$this->templateExists($template)) {
|
||||||
$handler = new ExceptionHandler($this->debug, $this->twig->getCharset(), $this->fileLinkFormat);
|
$handler = new ExceptionHandler($this->debug, $this->twig->getCharset(), $this->fileLinkFormat);
|
||||||
|
|
||||||
return new Response($handler->getContent($exception), 200, ['Content-Type' => 'text/html']);
|
return new Response($handler->getContent($exception), 200, ['Content-Type' => 'text/html']);
|
||||||
|
Reference in New Issue
Block a user