From f66cf42d751e9000c2d9593f933668989c24d0a2 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 29 Sep 2011 23:29:13 +0200 Subject: Fixed *very* stupid bug in ste:for subcompiler. The result of this bug: every for-loop, where the step parameter could be evaluated at compile time (i.e. only text) had step = 1. Should have seen this in the example pages... --- stupid_template_engine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stupid_template_engine.php b/stupid_template_engine.php index 860067b..e55023d 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -607,7 +607,7 @@ $ste_builtins = array( if(empty($ast->params["step"])) $step = 1; else if((count($ast->params["step"]) == 1) and ($ast->params["step"][0] instanceof TextNode)) - $step = $ast->params["step"][0] + 0; + $step = $ast->params["step"][0]->text + 0; else $code .= "\$${loopname}_step = " . _transcompile($ast->params["step"], True) . ";\n"; -- cgit v1.2.3-70-g09d2