From 1507a4a6776ab55cf799cbd96d09620a3b364f7b Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 12 Feb 2004 21:43:10 +0000 Subject: [PATCH] Fix (thx Andi) --- ext/spl/spl_array.c | 12 ++---------- 1 file 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: -- 2.40.0