Bug#332735: [php-maint] Bug#332735: php4: foreach needs $key to work properly

Adam Conrad adconrad at 0c3.net
Sat Oct 8 09:50:19 UTC 2005


Tobias Daur wrote:
> Package: php4
> Version: 4.3.10-16
> 
> Foreach in php normaly works with and without a given key:
> 
> foreach (array_expression as $value)
>     statement
> foreach (array_expression as $key => $value)
>     statement
> 
> But foreach in the package mentioned above doesn't assign the value of
> the current element, but the complete array. 

I can't reproduce this at all with your test script, it works fine for
me on 4.1.2-7.woody5 in woody, 4.3.10-16 in sarge, and 4.4.0-2 in sid,
as well as 5.0.5-1 in sid.

The info normally printed by reportbug at the bottom of a bug report may
have been helpful here (what architecture you're running on, the
versions of various dependency packages, etc).  Can you give me some
more to work with? :)

... Adam




More information about the pkg-php-maint mailing list