aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-07-02 14:24:48 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-07-02 14:24:48 -0500
commit9652483ef49295379b28bdd842c846c0160fa1a1 (patch)
tree731c83084f6a904265146ee643d1fec8f8c984bb
parent52bce2ce11013477f763d0e9fe4f6f724a970f29 (diff)
downloadforums-9652483ef49295379b28bdd842c846c0160fa1a1.tar
forums-9652483ef49295379b28bdd842c846c0160fa1a1.tar.gz
forums-9652483ef49295379b28bdd842c846c0160fa1a1.tar.bz2
forums-9652483ef49295379b28bdd842c846c0160fa1a1.tar.xz
forums-9652483ef49295379b28bdd842c846c0160fa1a1.zip
[feature/twig] Fix begin loop var regex
PHPBB3-11598
-rw-r--r--phpBB/includes/template/twig/lexer.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/template/twig/lexer.php b/phpBB/includes/template/twig/lexer.php
index b32a9e4ffa..c7ab1590f5 100644
--- a/phpBB/includes/template/twig/lexer.php
+++ b/phpBB/includes/template/twig/lexer.php
@@ -134,10 +134,10 @@ class phpbb_template_twig_lexer extends Twig_Lexer
}
}
- // Remove all parent nodes, e.g. foo, bar from foo.bar.foobar
+ // Remove all parent nodes, e.g. foo, bar from foo.bar.foobar.VAR
foreach ($parent_nodes as $node)
{
- $body = preg_replace('#([^a-zA-Z0-9])' . $node . '\.#', '$1', $body);
+ $body = preg_replace('#([^a-zA-Z0-9_])' . $node . '\.([a-zA-Z0-9_]+)\.#', '$1$2.', $body);
}
// Add current node to list of parent nodes for child nodes