bug #15589 made Symfony compatible with both Twig 1.x and 2.x (fabpot)
This PR was merged into the 2.3 branch.
Discussion
----------
made Symfony compatible with both Twig 1.x and 2.x
Commits
-------
4de4180
made Symfony compatible with both Twig 1.x and 2.x
This commit is contained in:
commit
34bbd126d9
@ -19,12 +19,12 @@ if (!class_exists('Twig_Environment')) {
|
|||||||
} else {
|
} else {
|
||||||
class StubFilesystemLoader extends \Twig_Loader_Filesystem
|
class StubFilesystemLoader extends \Twig_Loader_Filesystem
|
||||||
{
|
{
|
||||||
protected function findTemplate($name)
|
protected function findTemplate($name, $throw = true)
|
||||||
{
|
{
|
||||||
// strip away bundle name
|
// strip away bundle name
|
||||||
$parts = explode(':', $name);
|
$parts = explode(':', $name);
|
||||||
|
|
||||||
return parent::findTemplate(end($parts));
|
return parent::findTemplate(end($parts), $throw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class FilesystemLoader extends \Twig_Loader_Filesystem
|
|||||||
*
|
*
|
||||||
* @throws \Twig_Error_Loader if the template could not be found
|
* @throws \Twig_Error_Loader if the template could not be found
|
||||||
*/
|
*/
|
||||||
protected function findTemplate($template)
|
protected function findTemplate($template, $throw = true)
|
||||||
{
|
{
|
||||||
$logicalName = (string) $template;
|
$logicalName = (string) $template;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user