summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stupid_template_engine.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/stupid_template_engine.php b/stupid_template_engine.php
index 0eef489..db9028a 100644
--- a/stupid_template_engine.php
+++ b/stupid_template_engine.php
@@ -55,7 +55,7 @@ class VariableNode extends ASTNode
$varaccess = '@$ste->vars[' . (is_numeric($this->name) ? $this->name : '"' . escape_text($this->name) . '"'). ']';
foreach($this->arrayfields as $af)
{
- if((count($af) == 1) and ($af[0] instanceof TextNode) and is_numeric($af->text))
+ if((count($af) == 1) and ($af[0] instanceof TextNode) and is_numeric($af[0]->text))
$varaccess .= '[' . $af->text . ']';
else
$varaccess .= '[' . implode(".",