mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Bugfix #27586 ArrayObject::getIterator crashes with [] assignment
This commit is contained in:
parent
9fc9639c83
commit
b95d8d14d5
2
NEWS
2
NEWS
@ -21,6 +21,8 @@ PHP NEWS
|
||||
- Fixed problem preventing startup errors from being displayed. (Marcus)
|
||||
- Fixed start-up problem if both SPL and SimpleXML were enabled. The double
|
||||
initialization of apache 1.3 was causing problems here. (Marcus, Derick)
|
||||
- Fixed bug #27586 (ArrayObject::getIterator crashes with [] assignment).
|
||||
(Marcus)
|
||||
- Fixed bug #27537 (Objects pointing to each other segfaults). (Dmitry)
|
||||
- Fixed bug #27338 (memory leak inside tsrm_virtual_cwd.c on win32). (Ilia)
|
||||
- Fixed bug #27287 (wddx segfaults during deserialization). (Moriyoshi)
|
||||
|
@ -196,6 +196,11 @@ static void spl_array_write_dimension(zval *object, zval *offset, zval *value TS
|
||||
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
long index;
|
||||
|
||||
if (!offset) {
|
||||
value->refcount++;
|
||||
add_next_index_zval(intern->array, value);
|
||||
return;
|
||||
}
|
||||
switch(Z_TYPE_P(offset)) {
|
||||
case IS_STRING:
|
||||
value->refcount++;
|
||||
|
Loading…
Reference in New Issue
Block a user