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.
2 parents 278a393 + 04ab1f3 commit c979fb2Copy full SHA for c979fb2
Fragment/HIncludeFragmentRenderer.php
@@ -140,12 +140,16 @@ private function templateExists($template)
140
}
141
142
$loader = $this->templating->getLoader();
143
- if ($loader instanceof \Twig_ExistsLoaderInterface) {
+ if ($loader instanceof \Twig_ExistsLoaderInterface || method_exists($loader, 'exists')) {
144
return $loader->exists($template);
145
146
147
try {
148
- $loader->getSource($template);
+ if (method_exists($loader, 'getSourceContext')) {
149
+ $loader->getSourceContext($template);
150
+ } else {
151
+ $loader->getSource($template);
152
+ }
153
154
return true;
155
} catch (\Twig_Error_Loader $e) {
0 commit comments