diff options
author | Mike Willbanks <mike@digitalstruct.com> | 2013-02-22 13:05:38 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2013-02-26 22:11:52 -0800 |
commit | 61099f85857193c223dd62b0c5302507a77cf0ab (patch) | |
tree | 3b7f5c3209fd03a75859e4237f8d15f33bc26243 /ext/spl/tests | |
parent | 1b58bd39a637e9ec4ea9e95903b74aefdbd1b596 (diff) | |
download | php-git-61099f85857193c223dd62b0c5302507a77cf0ab.tar.gz |
Bug #52861: unset fails with ArrayObject and deep arrays
When checking to make into a reference write, readwrite are checked but not unset
Diffstat (limited to 'ext/spl/tests')
-rw-r--r-- | ext/spl/tests/bug52861.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/spl/tests/bug52861.phpt b/ext/spl/tests/bug52861.phpt new file mode 100644 index 0000000000..30a3261c4e --- /dev/null +++ b/ext/spl/tests/bug52861.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #52861 (unset failes with ArrayObject and deep arrays) +--FILE-- +<?php +$arrayObject = new ArrayObject(array('foo' => array('bar' => array('baz' => 'boo')))); + +unset($arrayObject['foo']['bar']['baz']); +print_r($arrayObject->getArrayCopy()); +?> +--EXPECT-- +Array +( + [foo] => Array + ( + [bar] => Array + ( + ) + + ) + +) + |