#50018 [NEW]: Typo in spl_limit_it_seek()
From: wimartin at uk dot ibm dot com
Operating system: Windows XP
PHP version: 5.2SVN-2009-10-27 (snap)
PHP Bug Type: SPL related
Bug description: Typo in spl_limit_it_seek()
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 bug report at http://bugs.php.net/?id=50018&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50018&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50018&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50018&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50018&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50018&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50018&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50018&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50018&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50018&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50018&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50018&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50018&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50018&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50018&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50018&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50018&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50018&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50018&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50018&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50018&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50018&r=mysqlcfg
Thread (2 messages)
- wimartin at uk dot ibm dot com