PHP 4.0 Bug #5859: fseek() with whence SEEK_CUR wrong
| From: | ccjeagle at ms6 dot hinet dot net | Date: | Sun, 30 Jul 2000 10:14:36 +0000 |
| Subject: | PHP 4.0 Bug #5859: fseek() with whence SEEK_CUR wrong | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-26909@lists.php.net to get a copy of this message | ||
From: ccjeagle@ms6.hinet.net
Operating system: FreeBSD-4.1RC
PHP version: 4.0.1pl2
PHP Bug Type: Other
Bug description: fseek() with whence SEEK_CUR wrong
// Begin of my.txt
1234567890
// End of my.txt
With the script :
// Begin of test.php
<?
$fp = fopen("my.txt","r") ;
echo fseek($fp,3) ; echo fgetc($fp) ;
echo fseek($fp,0,SEEK_CUR) ; echo fgetc($fp) ;
fclose($fp) ;
?>
// End of test
The result would be '0405', which should be
wrong with offset 0 with SEEK_CUR.
Gegards