-
Notifications
You must be signed in to change notification settings - Fork 8k
zend_API: Do not overwrite readonly
properties in object_properties_load()
#19767
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
zend_API: Do not overwrite readonly
properties in object_properties_load()
#19767
Conversation
46e3177
to
9411205
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good conceptually, but what about IS_PROP_UNINIT
?
I don't think this is necessary. It is only read for |
Right indeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! As mentioned privately, we should also unset the IS_PROP_UNINIT
and IS_PROP_LAZY
flags. However, the former is not consistently tracked on 8.3 anyway, and the latter only exists in 8.4. So this may be postponed. Lazy objects will also need more fixes to keep zend_lazy_object_info
up to date.
Lazy objects should be ok as this is a helper for internal classes, and only objects of userland classes can be lazy. |
@arnaud-lb However, some internal classes are not final and may be overridden (e.g. many SPL classes). I do not know off the top of my head whether they can still be lazy though. Edit: The answer is no. This is a non-issue then indeed! |
* PHP-8.3: zend_API: Do not overwrite `readonly` properties in `object_properties_load()` (#19767)
* PHP-8.4: zend_API: Do not overwrite `readonly` properties in `object_properties_load()` (#19767)
Fixes #19765.