ID: 41692 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Assigned Bug Type: SPL related Operating System: Gentoo PHP Version: 5.2.3 -Assigned To: helly +Assigned To: tony2001 New Comment:
I'll commit a patch for it in a minute.. Previous Comments: ------------------------------------------------------------------------ [2007-06-14 18:50:19] [EMAIL PROTECTED] Description: ------------ See the code for best description, what happens... Reproduce code: --------------- class Bar extends ArrayObject { private $foo = array( 1, 2, 3 ); function __construct() { parent::__construct($this->foo); } } $foo = new Bar(); var_dump($foo); object(Bar)#1 (3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } $foo['foo'] = 23; var_dump($foo); object(Bar)#1 (4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) ["foo"]=> int(23) } $bar = new Bar(); var_dump($bar); object(Bar)#2 (4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) ["foo"]=> int(23) } Expected result: ---------------- The second instance should have a clean array instead of the array which the first one got. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41692&edit=1