PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_Template_Flexy » Bug #84

Lexing of method arguments off-by-one

Details

Submitted2003-10-10 01:49 UTC
Fromjwadsack at wadsack-allen dot com
Assignedalan_k
StatusClosed
PackageHTML_Template_Flexy
PHP Version4.3.1
OSLinux
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)