ID: 37623 Updated by: [EMAIL PROTECTED] Reported By: sperson at lfdj dot com -Status: Open +Status: Assigned Bug Type: SPL related PHP Version: 5.1.4 -Assigned To: +Assigned To: helly
Previous Comments: ------------------------------------------------------------------------ [2006-05-29 09:27:32] sperson at lfdj dot com Description: ------------ When we do a foreach on an arrayObject, and we want to unset some item from the loop a NOTICE is thrown. Don't know if this is the intended behaviour but in case of doubt I prefer to submit. Reproduce code: --------------- $coll = new ArrayObject(); $coll->append(new stdClass()); foreach ($coll as $index => $item) { $coll->offsetUnset($index); } Expected result: ---------------- nothing Actual result: -------------- Notice: main() [function.main]: ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in index.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37623&edit=1