ID: 33287 Updated by: [EMAIL PROTECTED] Reported By: chris at deskpro dot com -Status: No Feedback +Status: Closed Bug Type: Arrays related Operating System: Win/MacOS linux untested PHP Version: 4.3.11 New Comment:
Marking as closed then. Previous Comments: ------------------------------------------------------------------------ [2005-08-13 11:44:08] ondrej at sury dot org Bug is fixed in php 4.4.0. ------------------------------------------------------------------------ [2005-06-18 01:00:04] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-06-10 11:28:49] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2005-06-09 22:11:40] chris at deskpro dot com Description: ------------ This is a repost of 33264 33264 was closed because it was said the bug is the same as 31114. They are however completly different. 31114 is about foreach where the $key and $value are the same: foreach ($array AS $key => $key) which should, perhaps issue a warning. However, 33264 is about foreach not issuing an error when you try and loop on an unset variable or a string e.g.: $array = ''; foreach ($array AS $value) { this should, and used to issue an error (I think it was fatal). It not longer does. The manual even suggests this error is not preventable with a @, but not it dosen't appear at all. So this is both a real bug and important. Reproduce code: --------------- <?php error_reporting(E_ALL); foreach ($a AS $b) { } ?> Expected result: ---------------- Error about $a not being an array. Actual result: -------------- No error. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33287&edit=1