-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix bug #81163 indirect vars in __sleep #7169
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
Conversation
d601160
to
393624e
Compare
ext/standard/var.c
Outdated
@@ -980,7 +980,13 @@ static void php_var_serialize_nested_data(smart_str *buf, zval *struc, HashTable | |||
static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, php_serialize_data_t var_hash) /* {{{ */ | |||
{ | |||
HashTable props; | |||
if (php_var_serialize_get_sleep_props(&props, struc, HASH_OF(retval_ptr)) == SUCCESS) { | |||
|
|||
if (Z_TYPE_P(retval_ptr) != IS_ARRAY) { |
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.
This check should be in php_var_serialize_call_sleep, replacing the HASH_OF check there.
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.
Right, of course.
Also, we want to do the other kind of fix (correctly) in branches below master, right ?
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.
May be nice to switch php_var_serialize_call_sleep to return HashTable* to avoid implicit zval type contract.
In 696d9d6 Quick sanity check ? |
Merged as fba4391 Thanks |
No description provided.