#32677 [Opn->Bgs]: undefined variable defined after passed to foreach
| From: | sniper@php.net | Date: | Mon, 11 Apr 2005 21:09:03 +0000 |
| Subject: | #32677 [Opn->Bgs]: undefined variable defined after passed to foreach | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76661@lists.php.net to get a copy of this message | ||
ID: 32677
Updated by: sniper@php.net
Reported By: cmoore at iyd dot com
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Linux
PHP Version: 4.3.11
New Comment:
Yes, one report is enough about this..
Previous Comments:
------------------------------------------------------------------------
[2005-04-11 20:53:04] cmoore at iyd dot com
Description:
------------
after calling foreach on an undefined variable, you no longer get
warnings about the variable being undefined with
error_reporting(E_ALL).
Reproduce code:
---------------
<?
error_reporting(E_ALL);
if ($undefined)
;
foreach($undefined as $unimportant)
;
if ($undefined)
;
Expected result:
----------------
Notice: Undefined variable: undefined in foreach.php on line 3
Notice: Undefined variable: undefined in foreach.php on line 7
Actual result:
--------------
Notice: Undefined variable: undefined in foreach.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32677&edit=1