summaryrefslogtreecommitdiff
path: root/ext/spl/spl_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/spl_functions.c')
-rw-r--r--ext/spl/spl_functions.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index 13440355ce..f409927271 100644
--- a/ext/spl/spl_functions.c
+++ b/ext/spl/spl_functions.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -84,8 +84,7 @@ void spl_add_class_name(zval *list, zend_class_entry *pce, int allow, int ce_fla
if ((tmp = zend_hash_find(Z_ARRVAL_P(list), pce->name)) == NULL) {
zval t;
- zend_string_addref(pce->name);
- ZVAL_STR(&t, pce->name);
+ ZVAL_STR_COPY(&t, pce->name);
zend_hash_add(Z_ARRVAL_P(list), pce->name, &t);
}
}