ID: 48816
Updated by: [email protected]
Reported By: spam at burgestrand dot se
Status: Open
Bug Type: SPL related
Operating System: Mac OS 10.5.7
PHP Version: 5.3.0
New Comment:
I can't reproduce here, I got a out of bounds exception on the seek
call.
Previous Comments:
------------------------------------------------------------------------
[2009-07-06 13:32:52] spam at burgestrand dot se
Description:
------------
After using seek() on an IteratorIterator containing an ArrayIterator
the next() call results in a bus error.
Also, the seek() method doesnt seem to advance the key to the
specified position on the inner iterator (unless issuing
getInnerIterator()->seek(x) directly and calling
getInnerIterator()->current()).
Reproduce code:
---------------
<?php
$iiter = new IteratorIterator(new ArrayIterator(range(0, 5)));
$iiter->rewind();
$iiter->seek(2);
var_dump($iiter->current());
$iiter->next(); // bus error
var_dump($iiter->current());
/* End of file */
Expected result:
----------------
int(2)
int(3)
Actual result:
--------------
int(0)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48816&edit=1