Skip to content

Commit fc30d5b

Browse files
committed
bug #24162 [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces (fabpot)
This PR was merged into the 2.7 branch. Discussion ---------- [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yesno | Fixed tickets | closes #23868 | License | MIT | Doc PR | n/a Commits ------- 10204ff [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2 parents 687ad65 + 10204ff commit fc30d5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)