Fix (thx Andi)

This commit is contained in:
Marcus Boerger 2004-02-12 21:43:10 +00:00
parent ab1e2e7c06
commit 1507a4a677

View File

@ -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: