aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/twig/lexer.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/template/twig/lexer.php')
-rw-r--r--phpBB/phpbb/template/twig/lexer.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
index 4f88147542..1a640e559e 100644
--- a/phpBB/phpbb/template/twig/lexer.php
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -236,7 +236,8 @@ class phpbb_template_twig_lexer extends Twig_Lexer
// Replace our "div by" with Twig's divisibleby (Twig does not like test names with spaces)
$code = preg_replace('# div by ([0-9]+)#', ' divisibleby($1)', $code);
- return preg_replace_callback('#<!-- (ELSE)?IF((.*)[\s][\$|\.|!]([^\s]+)(.*))-->#', $callback, $code);
+ // (ELSE)?\s?IF; match IF|ELSEIF|ELSE IF; replace ELSE IF with ELSEIF
+ return preg_replace_callback('#<!-- (ELSE)?\s?IF(.+?)-->#', $callback, $code);
}
/**