From a96fc3d87fdb6558397debd26992877677816d34 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 16 Nov 2016 21:39:29 +0100 Subject: [ticket/14867] Revert back to twig 1.26.* and update dependencies The revert of twig back to 1.26.* is necessary due to a breaking change in the way the Filesystem loader returns the paths to template files. PHPBB3-14867 --- phpBB/phpbb/template/twig/lexer.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'phpBB/phpbb') diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index de03aec04b..f1542109a4 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -22,11 +22,6 @@ class lexer extends \Twig_Lexer public function tokenize($code, $filename = null) { - if ($code instanceof \Twig_Source) - { - $filename = $code->getName(); - $code = $code->getCode(); - } // Our phpBB tags // Commented out tokens are handled separately from the main replace $phpbb_tags = array( @@ -130,7 +125,7 @@ class lexer extends \Twig_Lexer // Appends any filters $code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code); - return parent::tokenize(new \Twig_Source($code, $filename)); + return parent::tokenize($code, $filename); } /** -- cgit v1.2.1