From: vma1 at abv dot bg
Operating system: Slackware Linux 9.0
PHP version: 5CVS-2003-07-22 (dev)
PHP Bug Type: Arrays related
Bug description: foreach() is broken
Description:
------------
The last CVS version php5-200307221730 has broken handling of arrays in
foreach() structure. When enumerating array keys the values cannot be
accessed.
Reproduce code:
---------------
$list = array ();
$list ["0"] = "abc";
foreach ($list as $key => $unused) {
printf ("%s<br>", $list [$key]);
}
Expected result:
----------------
abc
Actual result:
--------------
Notice: Undefined index: 0 in /usr/local/apache/site/htdocs/bug.php on
line 5
--
Edit bug report at http://bugs.php.net/?id=24758&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24758&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24758&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24758&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24758&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24758&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24758&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24758&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24758&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24758&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24758&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24758&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24758&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24758&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24758&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24758&r=gnused