Skip to content

Commit 10204ff

Browse files
committed
[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
1 parent bcfe152 commit 10204ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function templateExists($template)
126126
}
127127

128128
try {
129-
if ($loader instanceof SourceContextLoaderInterface) {
129+
if ($loader instanceof SourceContextLoaderInterface || method_exists($loader, 'getSourceContext')) {
130130
$loader->getSourceContext($template);
131131
} else {
132132
$loader->getSource($template);

0 commit comments

Comments
 (0)