1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[ticket/12781] Template regex for IF catch too many things

PHPBB3-12781
This commit is contained in:
Tristan Darricau 2014-06-27 16:04:56 +02:00
parent 9b27d00d5f
commit 6d40b87661

View File

@ -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);
}
/**