aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-12-30 16:31:09 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-05-09 21:57:30 +0200
commit9f19202152d50ddadd066448c6bf6c45332e17af (patch)
treeae30745f029ce717f502185f4bca80951c975600 /phpBB/phpbb/template
parente7795fe7ce5205e0e89aad26c45da1e6f78f635d (diff)
downloadforums-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.php16
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