#84 [Opn->Asn]: Lexing of method arguments off-by-one
| From: | alan_k@php.net | Date: | Fri, 10 Oct 2003 03:09:00 +0000 |
| Subject: | #84 [Opn->Asn]: Lexing of method arguments off-by-one | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22540@lists.php.net to get a copy of this message | ||
ID: 84
Updated by: alan_k@php.net
Reported By: jwadsack at wadsack-allen dot com
-Status: Open
+Status: Assigned
Bug Type: HTML_Template_Flexy
Operating System: Linux
PHP Version: 4.3.1
-Assigned To:
+Assigned To: alan_k
New Comment:
Can you check that the lastest CVS version has the same problem (looks
like it probably does). - Will try and look at this later today.
Thanks
Alan
Previous Comments:
------------------------------------------------------------------------
[2003-10-09 21:49:09] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=84&edit=1