Home » HTML » HTML_Template_Flexy » Bug #84
Lexing of method arguments off-by-one
Details
| Submitted | 2003-10-10 01:49 UTC |
|---|---|
| From | jwadsack at wadsack-allen dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | HTML_Template_Flexy |
| PHP Version | 4.3.1 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2003-10-10 01:49 UTC] jwadsack at wadsack-allen dot com
Description:
------------
HTML/Template/Flexy/Tokenizer.php:
2402c2402
< $t = substr($this->yytext(),0,-1);
---
> $t = $this->yytext();
The effect of this bug is that any single-character argument sent to a method call is deleted, resulting in the element parser sending the object instead of the variable.
Reproduce code:
---------------
{foreach:list,i}{method(i)}{end:}
Expected result:
----------------
<?php foreach( $t->list as $i ) { $t->method($i) } ?>
Actual result:
--------------
<?php foreach( $t->list as $i ) { $t->method($t) } ?>
(Note $t not $i as the argument)