We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1038221 commit 390cb33Copy full SHA for 390cb33
src/Symfony/Bundle/TwigBundle/TwigEngine.php
@@ -74,11 +74,11 @@ public function render($name, array $parameters = array())
74
if ($name instanceof TemplateReference) {
75
try {
76
// try to get the real name of the template where the error occurred
77
- $name = $e->getTemplateName();
78
- $path = (string) $this->locator->locate($this->parser->parse($name));
79
if (method_exists($e, 'setSourceContext')) {
80
- $e->setSourceContext(new \Twig_Source('', $name, $path));
+ $e->setSourceContext($e->getSourceContext());
81
} else {
+ $templateName = $e->getTemplateName();
+ $path = (string) $this->locator->locate($this->parser->parse($templateName));
82
$e->setTemplateName($path);
83
}
84
} catch (\Exception $e2) {
0 commit comments