summaryrefslogtreecommitdiff
path: root/Zend/zend_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_hash.c')
-rw-r--r--Zend/zend_hash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index d541b3168f..6304737f04 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -1599,8 +1599,7 @@ ZEND_API void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key,
} else {
p = ht->arData + idx;
if (p->key) {
- ZVAL_STR(key, p->key);
- zend_string_addref(p->key);
+ ZVAL_STR_COPY(key, p->key);
} else {
ZVAL_LONG(key, p->h);
}