summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-02-12 21:43:10 +0000
committerMarcus Boerger <helly@php.net>2004-02-12 21:43:10 +0000
commit1507a4a6776ab55cf799cbd96d09620a3b364f7b (patch)
treee6382622a9de695b22f8e1c07cff3f7c2720715c
parentab1e2e7c0694c461130f58929d38f5206704a831 (diff)
downloadphp-git-1507a4a6776ab55cf799cbd96d09620a3b364f7b.tar.gz
Fix (thx Andi)
-rwxr-xr-xext/spl/spl_array.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 5c01f26c91..bd1e12ce9e 100755
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -198,11 +198,7 @@ static void spl_array_write_dimension(zval *object, zval *offset, zval *value TS
switch(Z_TYPE_P(offset)) {
case IS_STRING:
- if (!value->is_ref) {
- value->refcount++;
- } else {
- SEPARATE_ZVAL_IF_NOT_REF(&value);
- }
+ value->refcount++;
zend_symtable_update(HASH_OF(intern->array), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL);
return;
case IS_DOUBLE:
@@ -214,11 +210,7 @@ static void spl_array_write_dimension(zval *object, zval *offset, zval *value TS
} else {
index = Z_LVAL_P(offset);
}
- if (!value->is_ref) {
- value->refcount++;
- } else {
- SEPARATE_ZVAL_IF_NOT_REF(&value);
- }
+ value->refcount++;
add_index_zval(intern->array, index, value);
return;
default: