]> granicus.if.org Git - php/commitdiff
Fix (thx Andi)
authorMarcus Boerger <helly@php.net>
Thu, 12 Feb 2004 21:43:10 +0000 (21:43 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 12 Feb 2004 21:43:10 +0000 (21:43 +0000)
ext/spl/spl_array.c

index 5c01f26c91aec15339b3e348cf8c0b08654e6c76..bd1e12ce9e89415733ef76fb6ba0e05aa74b5b88 100755 (executable)
@@ -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: