diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-12-30 16:31:09 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-05-09 21:57:30 +0200 |
commit | 9f19202152d50ddadd066448c6bf6c45332e17af (patch) | |
tree | ae30745f029ce717f502185f4bca80951c975600 /phpBB/phpbb/template | |
parent | e7795fe7ce5205e0e89aad26c45da1e6f78f635d (diff) | |
download | forums-9f19202152d50ddadd066448c6bf6c45332e17af.tar forums-9f19202152d50ddadd066448c6bf6c45332e17af.tar.gz forums-9f19202152d50ddadd066448c6bf6c45332e17af.tar.bz2 forums-9f19202152d50ddadd066448c6bf6c45332e17af.tar.xz forums-9f19202152d50ddadd066448c6bf6c45332e17af.zip |
[ticket/14948] Update lexer to be compatible with twig 2.6
PHPBB3-14948
Diffstat (limited to 'phpBB/phpbb/template')
-rw-r--r-- | phpBB/phpbb/template/twig/lexer.php | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index d0bcfa615e..6615a46067 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -15,20 +15,10 @@ namespace phpbb\template\twig; class lexer extends \Twig_Lexer { - public function set_environment(\Twig_Environment $env) + public function tokenize(\Twig_Source $source) { - $this->env = $env; - } - - public function tokenize($code, $filename = null) - { - // Handle \Twig_Source format input - if ($code instanceof \Twig_Source) - { - $source = $code; - $code = $source->getCode(); - $filename = $source->getName(); - } + $code = $source->getCode(); + $filename = $source->getName(); // Our phpBB tags // Commented out tokens are handled separately from the main replace |