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: 2017-01-28 11:30 UTC
From: bugs dot php at mohiva dot com Assigned:
Status: Open 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
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Nov 20 21:01:26 2018 UTC