Edit report at https://bugs.php.net/bug.php?id=61230&edit=1

 ID:                 61230
 Updated by:         cataphr...@php.net
 Reported by:        frame at dynamiccreated dot de
 Summary:            stream_seek() is receiving SEEK_CUR on mode 'a' or
                     'a+'.
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Streams related
 Operating System:   Windows
 PHP Version:        5.3.10
 Block user comment: N
 Private report:     N

 New Comment:

seek is called to *determine* the current position. SEEK_CUR with offset 0 is 
used. There's no intention in changing the file pointer. This is expected 
behavior.


Previous Comments:
------------------------------------------------------------------------
[2012-03-01 23:48:56] frame at dynamiccreated dot de

Description:
------------
fopen() gives a wrong constant to stream_seek when opening the stream in append 
mode.

Test script:
---------------
SEEK_CUR (1) will be given. This is wrong since mode 'a' should set the pointer 
to the end of the file, so SEEK_END (2) would be right.

#0  FileWrapper->stream_seek(0, 1)
#1  fopen(xyz://test, a+) called at ...



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61230&edit=1

Reply via email to