#25996 [Opn->Ver]: Assignment by reference suppress index error
| From: | iliaa@php.net | Date: | Mon, 27 Oct 2003 22:17:40 +0000 |
| Subject: | #25996 [Opn->Ver]: Assignment by reference suppress index error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-49542@lists.php.net to get a copy of this message | ||
ID: 25996
Updated by: iliaa@php.net
Reported By: hongnk at hotmail dot com
-Status: Open
+Status: Verified
Bug Type: Scripting Engine problem
Operating System: All
PHP Version: Irrelevant
Previous Comments:
------------------------------------------------------------------------
[2003-10-26 21:33:23] hongnk at hotmail dot com
Description:
------------
Accessing array with uninitialized index will normally trigger error:
$a=array();
$b=$a['unknown']; => undefined index error
but if I assign by reference:
$b=&$a['unknown'];
then PHP no longer throw error. (The same goes for assigning undefined
property to an object.)
This makes it difficult to debug scripts.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25996&edit=1