summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 7f94091c25..8077fba77d 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -356,7 +356,7 @@ long_dim:
}
if (Z_ISUNDEF_P(rv)) {
- ZVAL_COPY_VALUE(rv, &EG(uninitialized_zval));
+ ZVAL_NULL(rv);
}
return rv;
@@ -2397,7 +2397,8 @@ zend_object_iterator *php_sxe_get_iterator(zend_class_entry *ce, zval *object, i
iterator = emalloc(sizeof(php_sxe_iterator));
zend_iterator_init(&iterator->intern);
- ZVAL_COPY(&iterator->intern.data, object);
+ Z_ADDREF_P(object);
+ ZVAL_OBJ(&iterator->intern.data, Z_OBJ_P(object));
iterator->intern.funcs = &php_sxe_iterator_funcs;
iterator->sxe = Z_SXEOBJ_P(object);