Bug #52861 unset failes with ArrayObject and deep arrays #289

wants to merge 1 commit into

4 participants


ArrayObject fails to unset multi-dimensional arrays. This is due to the code that fools ZE to believe we have a reference check. In this case it is missing BP_VAR_UNSET whereas BP_VAR_W and BP_VAR_RW are handled. Changing this resolves the overall issue. This does not cause a break in BC other than the obvious fixing of the bug. Thanks to @auroraeosrose for helping me locate and did it!


$arrayObject(array('foo' => array('bar' => array('baz' => 'boo'))));
// will not work: PHP Notice:  Indirect modification of overloaded element of ArrayObject.

The patch resolves this behavior which has been broken since 5.3.4.

@mwillbanks mwillbanks Bug #52861unset failes with ArrayObject and deep arrays
When checking to make into a reference write, readwrite are checked but not unset

Comment on behalf of stas at php.net:


@php-pulls php-pulls closed this Feb 27, 2013
php.net member

this seems introduce issue: https://bugs.php.net/bug.php?id=66127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment