-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
SplFixedArray assertion failure with get_object_vars #17198
Labels
Comments
Doesn't repro on 8.3, but it does on 8.4. |
Bisected to 780a828 (property hooks) |
Sigh: https://3v4l.org/rEdH1 |
nielsdos
changed the title
Assertion failure Zend/zend_hash.c:1163
SplFixedArray assertion failure with get_object_vars
Dec 17, 2024
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Dec 17, 2024
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
added a commit
that referenced
this issue
Dec 17, 2024
* PHP-8.4: Fix GH-17198: SplFixedArray assertion failure with get_object_vars
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following code:
Resulted in this output:
PHP Version
nightly
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: