[feature/twig] Fix length replace in lexer

PHPBB3-11598
This commit is contained in:
Nathaniel Guse 2013-07-01 14:58:20 -05:00
parent 1a58d188aa
commit 943728d3ef

View file

@ -182,7 +182,7 @@ class phpbb_template_twig_lexer extends Twig_Lexer
$matches[1] = preg_replace('#\s\$([a-zA-Z_0-9]+)#', ' definition.$1', $matches[1]);
// Replace .test with test|length
$matches[1] = preg_replace('#\s\.([a-zA-Z_0-9]+)#', ' $1|length', $matches[1]);
$matches[1] = preg_replace('#\s\.([a-zA-Z_0-9\.]+)#', ' $1|length', $matches[1]);
return '<!-- IF' . $matches[1] . '-->';
};