diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-02 10:52:50 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-02 11:14:00 +0100 |
commit | de0ca4734e2e8b19fabe06027439ceb81ea2eb13 (patch) | |
tree | 0ed079b9b165f16ac703e94c9dcb40cd572af602 /ext/standard/var.c | |
parent | 701e8c66d199353d8b9654273ae10623b5065c3a (diff) | |
download | php-git-de0ca4734e2e8b19fabe06027439ceb81ea2eb13.tar.gz |
Deref names returned by __sleep()
Diffstat (limited to 'ext/standard/var.c')
-rw-r--r-- | ext/standard/var.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/var.c b/ext/standard/var.c index a2eb471d54..aafc35e8bf 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -778,6 +778,7 @@ static void php_var_serialize_collect_names(HashTable *ht, HashTable *src) /* {{ zend_hash_init(ht, zend_hash_num_elements(src), NULL, NULL, 0); ZEND_HASH_FOREACH_VAL(src, val) { + ZVAL_DEREF(val); if (Z_TYPE_P(val) != IS_STRING) { php_error_docref(NULL, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize."); |