Index: ext/spl/spl_array.c =================================================================== RCS file: /repository/php-src/ext/spl/spl_array.c,v retrieving revision 1.71.2.16 diff -u -p -d -r1.71.2.16 spl_array.c --- ext/spl/spl_array.c 4 Apr 2006 19:53:21 -0000 1.71.2.16 +++ ext/spl/spl_array.c 7 Apr 2006 22:28:28 -0000 @@ -144,10 +144,12 @@ static zend_object_value spl_array_objec if (clone_orig) { intern->array = other->array; if (Z_OBJ_HT_P(orig) == &spl_handler_ArrayObject) { - ZVAL_ADDREF(intern->array); - SEPARATE_ZVAL(&intern->array); + MAKE_STD_ZVAL(intern->array); + array_init(intern->array); + zend_hash_copy(HASH_OF(intern->array), HASH_OF(other->array), (copy_ctor_func_t) zval_add_ref, &tmp, sizeof(zval*)); + } + if (Z_OBJ_HT_P(orig) == &spl_handler_ArrayIterator) { ZVAL_ADDREF(other->array); - ZVAL_ADDREF(intern->array); } } else { intern->array = orig;