summaryrefslogtreecommitdiff
path: root/Zend/zend_builtin_functions.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-02-25 00:17:13 +0400
committerDmitry Stogov <dmitry@zend.com>2014-02-25 00:17:13 +0400
commitfea971e1e4811c65fbc4dd0513c3ff6ab7916790 (patch)
treeecf46024d84ffa7c9fde928bbc6681c8a8af12ed /Zend/zend_builtin_functions.c
parente9cde67d47c2a432035f1d2766217efd00775fd8 (diff)
downloadphp-git-fea971e1e4811c65fbc4dd0513c3ff6ab7916790.tar.gz
Better IS_REFERENCE handling
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r--Zend/zend_builtin_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 865e0d5ae5..d5df1174ed 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -602,7 +602,7 @@ ZEND_FUNCTION(each)
/* add value elements */
if (Z_ISREF_P(entry)) {
ZVAL_DUP(&tmp, Z_REFVAL_P(entry));
- Z_SET_REFCOUNT(tmp, 0);
+ if (IS_REFCOUNTED(Z_TYPE(tmp))) Z_SET_REFCOUNT(tmp, 0);
entry = &tmp;
}
zend_hash_index_update(Z_ARRVAL_P(return_value), 1, entry);