#33264 [Opn->Bgs]: foreach doesn't issue error at all.
| From: | sniper@php.net | Date: | Tue, 07 Jun 2005 21:33:23 +0000 |
| Subject: | #33264 [Opn->Bgs]: foreach doesn't issue error at all. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-80015@lists.php.net to get a copy of this message | ||
ID: 33264
Updated by: sniper@php.net
Reported By: j_davchev at cisbg dot com
-Status: Open
+Status: Bogus
-Bug Type: *Programming Data Structures
+Bug Type: Arrays related
Operating System: Tested on linux
PHP Version: 4.3.11
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
see bug #31114
Previous Comments:
------------------------------------------------------------------------
[2005-06-07 14:18:25] j_davchev at cisbg dot com
Description:
------------
The foreach construct does not produce any error. It doesn't matter if
variable is not defined or if variable is not an array.
error_reporting E_ALL
display_error = on
PHP manual
"
foreach works only on arrays, and will issue an error when you try to
use it on a variable with a different data type or an uninitialized
variable."
Just not so in version 4.3.11.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33264&edit=1