Bug #79072 [NEW]: If passed via a stream processor, the included file contents get corrupted

From: Date: Mon, 06 Jan 2020 16:52:59 +0000
Subject: Bug #79072 [NEW]: If passed via a stream processor, the included file contents get corrupted
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224736@lists.php.net to get a copy of this message
From:             morozov at tut dot by
Operating system: Linux
PHP version:      7.4.1
Package:          Streams related
Bug Type:         Bug
Bug description:If passed via a stream processor, the included file contents get corrupted

Description:
------------
There are some undocumented changes in PHP 7.4 which make the stream
filter that worked on PHP 7.3 and earlier not work on PHP 7.4.

Specifically, if an included file contents are passed through a stream
filter, the file contents get corrupted (assumingly, truncated)
resulting in a parse error.

It is impossible to reproduce the issue using a single file, so there's
a repository dedicated to reproducing the issue:
https://github.com/janvernieuwe/php-vcr-debug.

Interestingly, if the classes are included in the same file as the code
using them, the issue is _not_ reproducible.

Test script:
---------------
Cannot include the files since the bug tracker detects them as spam.

Expected result:
----------------
No error

Actual result:
--------------
PHP Parse error:  syntax error, unexpected end of file in
IncludeFile.php on line 7


-- 
Edit bug report at https://bugs.php.net/bug.php?id=79072&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79072&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79072&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79072&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79072&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79072&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79072&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79072&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79072&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79072&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79072&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79072&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79072&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79072&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79072&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79072&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79072&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79072&r=mysqlcfg


Thread (10 messages)

« previous php.bugs (#224736) next »