#25996 [NEW]: Assignment by reference suppress index error
| From: | hongnk at hotmail dot com | Date: | Mon, 27 Oct 2003 02:33:23 +0000 |
| Subject: | #25996 [NEW]: Assignment by reference suppress index error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-49493@lists.php.net to get a copy of this message | ||
From: hongnk at hotmail dot com
Operating system: All
PHP version: Irrelevant
PHP Bug Type: Scripting Engine problem
Bug description: Assignment by reference suppress index error
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 bug report at http://bugs.php.net/?id=25996&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25996&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25996&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25996&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25996&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25996&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25996&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25996&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25996&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25996&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25996&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25996&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25996&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25996&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25996&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25996&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25996&r=float