From: tabacco at adventuregamers dot com Operating system: RH EL3 Kernel 2.4.21-20.0.1.EL PHP version: 4.3.10 PHP Bug Type: Scripting Engine problem Bug description: foreach does not set value variable
Description: ------------ When I upgraded to 4.3.10 from 4.3.9, every piece of code on my site that used foreach() broke. As near as I can tell, in foreach($array as $value), $value wasn't being set. I uninstalled 4.3.10 and reinstalled 4.3.9 and it works beautifully again. I used the same php.ini all three times. Reproduce code: --------------- <?php $test_arr = array(1,2,3,4,5); foreach($test_arr as $number) { echo $number; } ?> Expected result: ---------------- It should print: 12345 Actual result: -------------- It prints nothing, and isset($number) returns FALSE. -- Edit bug report at http://bugs.php.net/?id=31143&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31143&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31143&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31143&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31143&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31143&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31143&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31143&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31143&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31143&r=support Expected behavior: http://bugs.php.net/fix.php?id=31143&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31143&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31143&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31143&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31143&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31143&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31143&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31143&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31143&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31143&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31143&r=mysqlcfg