diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-10-25 01:37:29 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-10-25 01:37:29 +0200 |
commit | 2ffa4ae4253276af4c1266b73df3ddaf7ddf0051 (patch) | |
tree | 494829befd104527dd90ece6d2ff7884d018d576 /stupid_template_engine.php | |
parent | 80c76caffa50ce7c9a520ff2773d1c98b9100875 (diff) | |
download | ste-2ffa4ae4253276af4c1266b73df3ddaf7ddf0051.tar.gz ste-2ffa4ae4253276af4c1266b73df3ddaf7ddf0051.tar.bz2 ste-2ffa4ae4253276af4c1266b73df3ddaf7ddf0051.zip |
Fixed potential bug in VariableNode::transcompile
Also now PHP doesn't throw notices here.
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 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(".", |