ID:               50018
 Updated by:       [email protected]
 Reported By:      wimartin at uk dot ibm dot com
-Status:           Open
+Status:           Closed
 Bug Type:         SPL related
 Operating System: Windows XP
 PHP Version:      5.2SVN-2009-10-27 (snap)
 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2009-10-27 21:57:26] [email protected]

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=290002
Log: - Fixed bug #50018 (Typo in spl_limit_it_seek())

------------------------------------------------------------------------

[2009-10-27 14:36:38] wimartin at uk dot ibm dot com

Description:
------------
There is a typo in spl_limit_it_seek() in iterators.c. An exception is
thrown with the message "Cannot seek to %ld which is behind offest %ld
plus count %ld".

"offest" should in fact, be "offset".

iterator_032.phpt tests this functionality but the expected output is
incorrect as well.

Reproduce code:
---------------
<?php

$it = new LimitIterator(new ArrayIterator(array(1,2,3,4)), 1, 2);

try
{
    $it->seek(3);
}
catch(OutOfBoundsException $e)
{
    echo $e->getMessage() . "\n";
}

?>



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50018&edit=1

Reply via email to