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
-------
10204ffe99
[WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
This commit is contained in:
commit
fc30d5b0cf
@ -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);
|
||||
|
Reference in New Issue
Block a user