Bug #79072 [Opn->Ver]: If passed via a stream processor, the included file contents get corrupted

From: Date: Mon, 06 Jan 2020 17:50:41 +0000
Subject: Bug #79072 [Opn->Ver]: If passed via a stream processor, the included file contents get corrupted
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224738@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79072&edit=1 ID: 79072 Updated by: nikic@php.net Reported by: morozov at tut dot by Summary: If passed via a stream processor, the included file contents get corrupted -Status: Open +Status: Verified Type: Bug Package: Streams related Operating System: Linux PHP Version: 7.4.1 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-01-06 16:52:59] morozov at tut dot by 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 this bug report at https://bugs.php.net/bug.php?id=79072&edit=1

« previous php.bugs (#224738) next »