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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Mar 19 10:01:30 2024 UTC