Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

mwillbanks
Copy link

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!

Example:

$arrayObject(array('foo' => array('bar' => array('baz' => 'boo'))));
unset($arrayObject['foo']['bar']['baz']);
// 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.

When checking to make into a reference write, readwrite are checked but not unset
@php-pulls
Copy link

Comment on behalf of stas at php.net:

merged

@php-pulls php-pulls closed this Feb 27, 2013
@laruence
Copy link
Member

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

@mapthegod
Copy link

Die Zustellung an folgende Empfänger oder Gruppen verzögert sich:

p.bandow@justepic.infomailto:p.bandow@justepic.info

Betreff: Re: [php-src] Bug #52861 unset failes with ArrayObject and deep arrays (#289)

Diese Nachricht wurde noch nicht zugestellt. Es wird weiterhin versucht, die Nachricht zuzustellen.

Der Server wird noch 2 Tage, 22 Stunden und 58 Minuten versuchen, die Nachricht zuzustellen. Sie erhalten eine Benachrichtigung, falls die Nachricht bis dahin nicht übermittelt werden konnte.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants