diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-07-03 12:44:33 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-07-03 12:44:33 +0200 |
| commit | a0e00889d1a03804625522405824ac8cbce15c22 (patch) | |
| tree | 800d813de85eb59b7dc9b8922322c7c680ecfc97 /phpBB | |
| parent | b0a3f2dc8f528526d02b04835bb6bda92421fe4b (diff) | |
| parent | 7ef983b4267db3a71c849a62f91fa1b0a94a78bb (diff) | |
| download | forums-a0e00889d1a03804625522405824ac8cbce15c22.tar forums-a0e00889d1a03804625522405824ac8cbce15c22.tar.gz forums-a0e00889d1a03804625522405824ac8cbce15c22.tar.bz2 forums-a0e00889d1a03804625522405824ac8cbce15c22.tar.xz forums-a0e00889d1a03804625522405824ac8cbce15c22.zip | |
Merge pull request #2670 from Nicofuma/ticket/12781
[ticket/12781] Template regex for IF catch too many things
* Nicofuma/ticket/12781:
[ticket/12781] Add tests
[ticket/12781] Template regex for IF catch too many things
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/phpbb/template/twig/lexer.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index cceefda7ef..c5dc7273ba 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -285,7 +285,7 @@ class lexer extends \Twig_Lexer return "<!-- {$matches[1]}IF{$inner}-->"; }; - return preg_replace_callback('#<!-- (ELSE)?IF((.*?) \(*!?[\$|\.]([^\s]+)(.*?))-->#', $callback, $code); + return preg_replace_callback('#<!-- (ELSE)?IF((.*?) (?:\(*!?[\$|\.]([^\s]+)(.*?))?)-->#', $callback, $code); } /** |
