summaryrefslogtreecommitdiff
path: root/ext/intl/resourcebundle/resourcebundle_iterator.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/resourcebundle/resourcebundle_iterator.c')
-rw-r--r--ext/intl/resourcebundle/resourcebundle_iterator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.c b/ext/intl/resourcebundle/resourcebundle_iterator.c
index b51f43f22b..8bb66a157f 100644
--- a/ext/intl/resourcebundle/resourcebundle_iterator.c
+++ b/ext/intl/resourcebundle/resourcebundle_iterator.c
@@ -157,7 +157,8 @@ zend_object_iterator *resourcebundle_get_iterator( zend_class_entry *ce, zval *o
}
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 = &resourcebundle_iterator_funcs;
iterator->subject = rb;