Skip to content

Fix GH-25265: Misaligned read for virtual internal props in hooked subclass - #25272

Closed
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-25265
Closed

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-25265

Conversation

@lazerg

@lazerg lazerg commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Internal classes like DOMDocument declare virtual properties that have no hooks and no slot in the object. When a user subclass adds a hooked property, get_object_vars() and foreach go through zho_build_properties_ex(), which treated every property without hooks as backed and read OBJ_PROP() at the virtual offset. Those properties are now skipped there, the same way rebuild_object_properties() already leaves them out.

Fixes #25265

@ndossche ndossche 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.

Thanks

@ndossche ndossche closed this in 55a8c1b Nov 8, 2026
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.

2 participants