diff options
author | Kevin Chabowski <kevin@kch42.de> | 2011-11-12 22:54:54 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2011-11-12 22:54:54 +0100 |
commit | 1a741e500f0288852cdf7e52dfb5b9075090857f (patch) | |
tree | 8853be64620de1d597568c38e8b7a12f7e6235bf /stupid_template_engine.php | |
parent | 370099b50befed22208ec88a621f633d032c780b (diff) | |
download | ste-1a741e500f0288852cdf7e52dfb5b9075090857f.tar.gz ste-1a741e500f0288852cdf7e52dfb5b9075090857f.tar.bz2 ste-1a741e500f0288852cdf7e52dfb5b9075090857f.zip |
Foreach counter bug fixed.
The current counter value was not set prorperly.
Diffstat (limited to 'stupid_template_engine.php')
-rw-r--r-- | stupid_template_engine.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stupid_template_engine.php b/stupid_template_engine.php index ba840f0..69e5772 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -670,7 +670,7 @@ $ste_builtins = array( $loopbody .= "\$${loopname}_counter++;\n\$ste->set_var_by_name(\$${loopname}_countervar, \$${loopname}_counter);\n"; } - $loopbody = "\$ste->set_var_by_name(\$${loopname}_valuevar, \$${loopname}_value);\n"; + $loopbody .= "\$ste->set_var_by_name(\$${loopname}_valuevar, \$${loopname}_value);\n"; if(!empty($ast->params["key"])) $loopbody .= "\$ste->set_var_by_name(\$${loopname}_keyvar, \$${loopname}_key);\n"; $loopbody .= "\n"; |