#36669 [NEW]: php 5 foreach() bug

From: Date: Thu, 09 Mar 2006 13:38:10 +0000
Subject: #36669 [NEW]: php 5 foreach() bug
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94090@lists.php.net to get a copy of this message
From: peterpub1 at bivol dot net Operating system: CENT OS PHP version: 5.1.2 PHP Bug Type: Variables related Bug description: php 5 foreach() bug Description: ------------ OS: CENT OS PHP VERSION: 5.05 Zend Optimizer: 2.6.2 This line: foreach($GLOBALS as $key => $val){ ..... } When this piece of code is optimized/compiled with Zend produces this error: "Warning: Invalid argument supplied for foreach() in... " Not optimized works without any problems ? another bug like php 4.3.10 ? Reproduce code: --------------- foreach($GLOBALS as $key => $val){ ..... } Expected result: ---------------- see values Actual result: -------------- "Warning: Invalid argument supplied for foreach() in... " -- Edit bug report at http://bugs.php.net/?id=36669&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36669&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36669&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36669&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36669&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36669&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36669&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36669&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36669&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36669&r=support Expected behavior: http://bugs.php.net/fix.php?id=36669&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36669&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36669&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36669&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36669&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36669&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36669&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36669&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36669&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36669&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36669&r=mysqlcfg

« previous php.bugs (#94090) next »