Bugfix #27586 ArrayObject::getIterator crashes with [] assignment

This commit is contained in:
Marcus Boerger 2004-03-13 20:01:00 +00:00
parent 9fc9639c83
commit b95d8d14d5
2 changed files with 7 additions and 0 deletions

2
NEWS
View File

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

View File

@ -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++;