We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce2fb01 commit 02e24c5Copy full SHA for 02e24c5
src/TokenParser/ContinueNode.php
@@ -23,6 +23,8 @@ public function compile(Compiler $compiler)
23
{
24
$compiler
25
->addDebugInfo($this)
26
+ ->write("if (isset(\$context['loop'])) {\n")
27
+ ->indent()
28
// Taken from ForLoopNode - need to do this otherwise the continue skips it
29
->write("++\$context['loop']['index0'];\n")
30
->write("++\$context['loop']['index'];\n")
@@ -34,6 +36,9 @@ public function compile(Compiler $compiler)
34
36
->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n")
35
37
->outdent()
38
->write("}\n")
39
+ // End taken from FoorLoopNode
40
+ ->outdent()
41
+ ->write("}\n")
42
// Do the actual continue operation
43
->write("continue " . $this->loopNumber . ";\n")
44
;
0 commit comments