aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/twig/node/begin.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/template/twig/node/begin.php')
-rw-r--r--phpBB/includes/template/twig/node/begin.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/includes/template/twig/node/begin.php b/phpBB/includes/template/twig/node/begin.php
index 52e0a96f2a..1f4de9deda 100644
--- a/phpBB/includes/template/twig/node/begin.php
+++ b/phpBB/includes/template/twig/node/begin.php
@@ -45,10 +45,9 @@ class phpbb_template_twig_node_begin extends Twig_Node
}
$compiler
- ->write("if (isset(\$context['loop'])) {")
- ->write("foreach (\$context['loop']['")
- ->write($this->getAttribute('beginName'))
- ->write("'] as \$loops[\$nestingLevel]['i'] => \$loops[\$nestingLevel]['values']) {")
+ ->write("if (isset(\$context['loop']['" . $this->getAttribute('beginName') . "'])) {")
+ ->write("foreach (\$context['loop']['". $this->getAttribute('beginName'). "'] as \$" . $this->getAttribute('beginName') . ") {")
+ ->write("\$context['". $this->getAttribute('beginName'). "'] = \$" . $this->getAttribute('beginName') . ";")
->indent()
;