Bug #81346 [NEW]: Non-seekable streams do not update the position after write
From: cmb
Operating system: *
PHP version: 7.4Git-2021-08-10 (Git)
Package: Streams related
Bug Type: Bug
Bug description:Non-seekable streams do not update the position after write
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 bug report at https://bugs.php.net/bug.php?id=81346&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81346&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81346&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81346&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81346&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81346&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81346&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81346&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81346&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81346&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81346&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81346&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81346&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81346&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81346&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81346&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81346&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81346&r=mysqlcfg
Thread (3 messages)
- cmb@php.net