Fix GH-20875: Propagate IN_GET guard in get_property_ptr_ptr for lazy proxies#21463
Open
iliaal wants to merge 1 commit intophp:masterfrom
Open
Fix GH-20875: Propagate IN_GET guard in get_property_ptr_ptr for lazy proxies#21463iliaal wants to merge 1 commit intophp:masterfrom
iliaal wants to merge 1 commit intophp:masterfrom
Conversation
…azy proxies zend_std_get_property_ptr_ptr() was the only property handler that did not propagate the IN_GET guard to the underlying object when forwarding from a lazy proxy after initialization. This caused __get to be called on the underlying object when it shouldn't be, leading to assertion failures. The same guard-copying pattern already existed in read_property, write_property, unset_property, and has_property since commit 26f5009 (phpGH-18039). Also fixes phpGH-20873 and phpGH-20854. Closes phpGH-20875
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zend_std_get_property_ptr_ptr()was the only property handler that did not propagate theIN_GETguard to the underlying object when forwarding from a lazy proxy after initialization__getis called on the underlying object when it shouldn't be, causing assertion failures (_get_zval_ptr_tmp,_zendi_try_convert_scalar_to_number,ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER)read_property,write_property,unset_property, andhas_propertysince commit 26f5009 (Fix lazy proxy calling magic methods twice #18039)Fixes #20875, #20873, #20854.