ID: 30362 Updated by: [EMAIL PROTECTED] Reported By: uk_gavin_uk at hotmail dot com -Status: Assigned +Status: Closed Bug Type: Filesystem function related Operating System: * PHP Version: 5.* Assigned To: iliaa New Comment:
This bug has been fixed in CVS. 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: ------------------------------------------------------------------------ [2005-04-04 19:58:52] [EMAIL PROTECTED] Reproduced on Linux using latest CVS HEAD. Patch did not work. (was supposed to be fixed in PHP 5.0.4 but isn't :) ------------------------------------------------------------------------ [2004-10-11 20:33:07] [EMAIL PROTECTED] This bug has been fixed in CVS. 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. ------------------------------------------------------------------------ [2004-10-11 15:59:15] uk_gavin_uk at hotmail dot com $a = "Y"; echo "$a as Delimeter"; ------- I edited the code a bit to reduce the size, I was trying different $a to see if it made a difference - it didnt! ------------------------------------------------------------------------ [2004-10-08 13:39:34] uk_gavin_uk at hotmail dot com Description: ------------ - Downloaded and using php-5.0.2-Win32.zip from www.php.net - Confirmed md5 hash using stream_get_line() on a file I get data returned to me but not in the manner expected or documented?? It's best you look at the Reproduce code, but it looks like the function reads up until the first instance of the delimiter specified, but on subsequent calls it ignores the delemeter and reads in the number of chars it did on the first call?? Reproduce code: --------------- <?php $resource = fopen('C:/test/import/file.txt', 'rb'); for ($i = 0; ($i < 10) && !feof($resource); ++$i ) { $line = stream_get_line($resource, 50, $a); echo $line . "\n"; } fclose($resource); ?> FILE.TXT: 111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111Y111111111 Expected result: ---------------- 111 111111111 111111111 111111111 111111111 111111111 111111111 111111111 Actual result: -------------- 111 Y11 111 111 1Y1 111 111 11Y 111 111 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30362&edit=1