mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
Fix (thx Andi)
This commit is contained in:
parent
ab1e2e7c06
commit
1507a4a677
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user