Skip to content

Fix GH-13531: Unable to resize SplfixedArray after being unserialized in PHP 8.2.15 #13543

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

Conversation

nielsdos
Copy link
Member

When unserializing, the cached_resize field was not reset to -1 correctly, causing the setSize() method to think we were inside of a resize operation.

…zed in PHP 8.2.15

When unserializing, the cached_resize field was not reset to -1
correctly, causing the setSize() method to think we were inside of a
resize operation.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing unserialize calls spl_fixedarray_default_ctor ?

@nielsdos
Copy link
Member Author

spl_fixedarray_default_ctor

No, it calls spl_fixedarray_init_non_empty_struct which didn't have the write to the cached_resize field, and then by adding that it made sense to move the other field write to spl_fixedarray_default_ctor.

@Girgias
Copy link
Member

Girgias commented Feb 27, 2024

spl_fixedarray_default_ctor

No, it calls spl_fixedarray_init_non_empty_struct which didn't have the write to the cached_resize field, and then by adding that it made sense to move the other field write to spl_fixedarray_default_ctor.

ACK

@nielsdos nielsdos closed this in 8494058 Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to resize SplfixedArray after being unserialized in PHP 8.2.15
2 participants