php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55528 Values for the "whence" parameter of the "stream_seek" method should be changed
Submitted: 2011-08-29 11:48 UTC Modified: 2020-09-08 11:15 UTC
From: bugs dot php at mohiva dot com Assigned: cmb (profile)
Status: Closed Package: Streams related
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugs dot php at mohiva dot com
New email:
PHP Version: OS:

 

 [2011-08-29 11:48 UTC] bugs dot php at mohiva dot com
Description:
------------
It's documented that the streamWrapper::stream_seek method accepts the following values for the $whence parameter:

SEEK_SET - Set position equal to offset bytes.
SEEK_CUR - Set position to current location plus offset.
SEEK_END - Set position to end-of-file plus offset.

But the SEEK_CUR value gets never be passed to this method because SEEK_CUR seeks are internally converted to SEEK_SET seeks.

Expected result:
----------------
The possible values for the "whence" parameter of the "stream_seek" method should only be SEEK_SET and SEEK_END. And there should be a hint that the SEEK_CUR seeks are internally converted to SEEK_SET seeks.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-29 11:52 UTC] bugs dot php at mohiva dot com
The URL for the discussion on the internal list:
http://news.php.net/php.internals/55000
 [2017-01-28 11:30 UTC] cmb@php.net
-Type: Feature/Change Request +Type: Documentation Problem -Package: Documentation problem +Package: Streams related
 [2020-09-08 11:15 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-09-08 11:22 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=70528fcff5b182ed42bcdee3acf0bf304896a518
Log: Fix #55528: Values for the "whence" parameter of the "stream_seek" method should be changed
 [2020-09-08 11:22 UTC] phpdocbot@php.net
-Status: Assigned +Status: Closed
 [2020-09-08 11:50 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=6dcb02d8b1fcb6e98f61f48a52903419afcc2c69
Log: Fix #65879: stream_select on STDIN returns 1 even on blocking stream Remove out-dated info regarding Windows 98 Fix #55528: Values for the "whence" parameter of the "stream_seek"
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=c9fc6b34d027756ba5d2688f5524a48af701667a
Log: Fix #65879: stream_select on STDIN returns 1 even on blocking stream Remove out-dated info regarding Windows 98 Fix #55528: Values for the "whence" parameter of the "stream_seek"
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 20:01:29 2024 UTC