Skip to content

Conversation

nielsdos
Copy link
Member

Because the properties table contains both a numeric index and a string index that map to 0 in a symbol table, this causes an assertion failure. Looking at the manual page of get_object_vars(), it seems that only real properties must be included. Given that SplFixedArray's elements are not accessible like properties, they should be excluded. This restores PHP 8.3 behaviour. The reason that this didn't cause problems on 8.3 is because it used a different handler (get_properties).

Because the properties table contains both a numeric index and a string
index that map to 0 in a symbol table, this causes an assertion failure.
Looking at the manual page of get_object_vars(), it seems that only real
properties must be included. Given that SplFixedArray's elements are not
accessible like properties, they should be excluded. This restores PHP
8.3 behaviour. The reason that this didn't cause problems on 8.3 is
because it used a different handler (get_properties).
@nielsdos nielsdos requested a review from Girgias as a code owner December 17, 2024 21:05
@nielsdos nielsdos linked an issue Dec 17, 2024 that may be closed by this pull request
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.

mstm

@nielsdos nielsdos closed this in 5f13c62 Dec 17, 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.

SplFixedArray assertion failure with get_object_vars

2 participants