diff --git a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php index 5b6b9f1004..91cd1fb837 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Profiler/TemplateManager.php @@ -126,7 +126,7 @@ class TemplateManager } try { - if ($loader instanceof SourceContextLoaderInterface) { + if ($loader instanceof SourceContextLoaderInterface || method_exists($loader, 'getSourceContext')) { $loader->getSourceContext($template); } else { $loader->getSource($template);