Bug #81346 [Asn->Csd]: Non-seekable streams do not update the position after write
Edit report at https://bugs.php.net/bug.php?id=81346&edit=1
ID: 81346
Updated by: git@php.net
Reported by: cmb@php.net
Summary: Non-seekable streams do not update the position
after write
-Status: Assigned
+Status: Closed
Type: Bug
Package: Streams related
Operating System: *
PHP Version: 7.4Git-2021-08-10 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmb69
Revision: https://github.com/php/php-src/commit/4a1af1f871d87b569443161ed1bf983d810cecbf
Log: Fix #81346: Non-seekable streams don't update position after write
Previous Comments:
------------------------------------------------------------------------
[2021-08-10 13:38:51] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #81346: Non-seekable streams don't update position after write
On GitHub: https://github.com/php/php-src/pull/7356
Patch: https://github.com/php/php-src/pull/7356.patch
------------------------------------------------------------------------
[2021-08-10 13:18:00] cmb@php.net
Description:
------------
When writing to a non-seekable stream, the stream position is not
properly updated, what can be whitnessed by ftell().
The seemingly strange expected output is due to bug #81345.
Test script:
---------------
<?php
$s = fopen("compress.bzip2://file.bz2", "w");
fwrite($s, str_repeat("hello world", 100));
fflush($s);
var_dump(ftell($s));
?>
Expected result:
----------------
int(1100)
Actual result:
--------------
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81346&edit=1
Thread (3 messages)