summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorTjerk Meesters <datibbaw@php.net>2014-09-09 17:58:45 +0800
committerTjerk Meesters <datibbaw@php.net>2014-09-09 17:58:45 +0800
commit99f0760bfba86f45af9ea011a0f017080922710a (patch)
tree87b383548e133ee5560bee70e80bf824184f7802 /Zend/zend_variables.c
parentd2e1a04b1011e15321b9748f76620786418b7893 (diff)
downloadphp-git-99f0760bfba86f45af9ea011a0f017080922710a.tar.gz
Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index b875445120..9674de5246 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -136,6 +136,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
ALLOC_HASHTABLE_REL(tmp_ht);
zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ tmp_ht->nNextFreeElement = original_ht->nNextFreeElement;
zvalue->value.ht = tmp_ht;
}
break;