From a4b104c1da36b6685fa57eeb7cb3cfa00f9242c5 Mon Sep 17 00:00:00 2001 From: mrgoldy Date: Thu, 27 Feb 2020 16:33:54 +0100 Subject: [PATCH] [ticket/16382] Update Twig_Source PHPBB3-16382 --- phpBB/phpbb/template/twig/lexer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 10346ac299..56ea1f8930 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -15,7 +15,7 @@ namespace phpbb\template\twig; class lexer extends \Twig_Lexer { - public function tokenize(\Twig_Source $source) + public function tokenize(\Twig\Source $source) { $code = $source->getCode(); $filename = $source->getName(); @@ -125,8 +125,8 @@ class lexer extends \Twig_Lexer // Appends any filters $code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code); - // Tokenize \Twig_Source instance - return parent::tokenize(new \Twig_Source($code, $filename)); + // Tokenize \Twig\Source instance + return parent::tokenize(new \Twig\Source($code, $filename)); } /**