Skip to content

Fix GH-10907: Unable to serialize processed SplFixedArrays in PHP 8.2.4 - #10921

Closed
ndossche wants to merge 2 commits into
php:PHP-8.2from
ndossche:fix-10907
Closed

ndossche wants to merge 2 commits into
php:PHP-8.2from
ndossche:fix-10907

Conversation

@ndossche

Copy link
Copy Markdown
Member

The properties table can also contain numeric entries after a rebuild of the table based on the array. Since the array can only contain numeric entries, and the properties table can contain a mix of both, we'll add the numeric entries from the array and only the string entries from the properties table. To implement this we simply check if the key from the properties table is a string.

…8.2.4

The properties table can also contain numeric entries after a rebuild of
the table based on the array. Since the array can only contain numeric
entries, and the properties table can contain a mix of both, we'll add
the numeric entries from the array and only the string entries from the
properties table. To implement this we simply check if the key from the
properties table is a string.
@ndossche
ndossche requested a review from Girgias March 23, 2023 23:25
@ndossche ndossche linked an issue Mar 23, 2023 that may be closed by this pull request

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thank you!

Comment thread ext/spl/tests/gh10907.phpt Outdated
GH-10907 (Unable to serialize processed SplFixedArrays in PHP 8.2.4)
--FILE--
<?php
// Test without rebuilding properties

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you echo the comments? It makes understanding what var_dumps correspond to what easier IMHO

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thx for the review, makes sense. I've done that now (ofc I'll squash that into the first commit when I merge this)

@kocsismate

Copy link
Copy Markdown
Member

Thank you for the fix!

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 serialize processed SplFixedArrays in PHP 8.2.4

3 participants