From:             victorepand at hotmail dot com
Operating system: Unix
PHP version:      5.2.0
PHP Bug Type:     Arrays related
Bug description:  Bug with global unset of 2 dimensional array

Description:
------------
When trying to unset a 2 dimensional array from within a function like
this (PHP 5.1):
   unset($GLOBALS["products"]);
elements like $products[123]["id"] continue to exist!

I had to use this command to unset the entire array, which is very
inefficient:
   foreach($products AS $their_product_id=>$ar)
unset($GLOBALS["products"][$their_product_id]);


Reproduce code:
---------------
unset($GLOBALS["products"]);

Expected result:
----------------
elements like $products[123]["id"] should no longer exist.

Actual result:
--------------
Elements like $products[123]["id"] continue to exist.

-- 
Edit bug report at http://bugs.php.net/?id=39728&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39728&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39728&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39728&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39728&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39728&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39728&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39728&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39728&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39728&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39728&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39728&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39728&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39728&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39728&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39728&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39728&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39728&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39728&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39728&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39728&r=mysqlcfg

Reply via email to