diff options
author | Nikita Popov <nikic@php.net> | 2015-06-11 19:41:43 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-06-11 23:23:57 +0200 |
commit | 5d3cf577aad15b119c137a873f468c0614f2eb2e (patch) | |
tree | abc522e177e51e526c5be4aef6cb42c911ed2cce /ext/simplexml/simplexml.c | |
parent | 25098f0f5c50249200b1dd80619c782d961287a2 (diff) | |
download | php-git-5d3cf577aad15b119c137a873f468c0614f2eb2e.tar.gz |
Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.
All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).
What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.
Also fixes bug #69788.
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r-- | ext/simplexml/simplexml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 6bcf12ea86..2d9e6fd339 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -517,7 +517,7 @@ static int sxe_prop_dim_write(zval *object, zval *member, zval *value, zend_bool case IS_DOUBLE: case IS_NULL: if (Z_TYPE_P(value) != IS_STRING) { - ZVAL_DUP(&zval_copy, value); + ZVAL_COPY(&zval_copy, value); value = &zval_copy; convert_to_string(value); new_value = 1; |