Login   Register  
PHP Classes
elePHPant
Icontem

BUG in clear_href

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Fast Template  >  All threads  >  BUG in clear_href  >  (Un) Subscribe thread alerts  
Subject:BUG in clear_href
Summary:may be bad testing
Messages:2
Author:Vasiliy
Date:2006-09-14 21:06:50
Update:2006-09-21 12:22:57
 

  1. BUG in clear_href   Reply   Report abuse  
Picture of Vasiliy
Vasiliy
2006-09-14 21:06:50
It seems to me that this class wasn't properly tested before submission. I have found another bug in clear_href function.

If you pass to clear_href a single value - everything will be OK, but if you try to pass there an array it doesn't work.

the bug is here

while (list ($Ref,$val) = each ($href) )
{
unset($this->PARSEVARS[$Ref]);
}

in this case the $Ref contains 0,1,2, ... , other indexes
to my mind it will bt better to use foreach statement

foreach ($href as $value)
{
unset($this->PARSEVARS[$value]);
}

  2. Re: BUG in clear_href   Reply   Report abuse  
Picture of Valics Lehel
Valics Lehel
2006-09-21 12:22:57 - In reply to message 1 from Vasiliy
Hi,

Tx for the bug, we will review and include in next release.