Doc->Bug #79467 [Ver]: file_put_contents can't create file with data:// wrappers
| From: | cmb@php.net | Date: | Sun, 03 May 2020 10:18:47 +0000 |
| Subject: | Doc->Bug #79467 [Ver]: file_put_contents can't create file with data:// wrappers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-226889@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79467&edit=1
ID: 79467
Updated by: cmb@php.net
Reported by: j7ur8 at qq dot com
Summary: file_put_contents can't create file with data://
wrappers
Status: Verified
-Type: Documentation Problem
+Type: Bug
Package: Streams related
Operating System: windows Linux
PHP Version: 7.4.4
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Re-classifying as bug according to @nikic's comment above.
Previous Comments:
------------------------------------------------------------------------
[2020-05-02 15:39:50] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #79467: data:// wrappers are writable
On GitHub: https://github.com/php/php-src/pull/5511
Patch: https://github.com/php/php-src/pull/5511.patch
------------------------------------------------------------------------
[2020-04-15 10:28:31] nikic@php.net
Looks like internally data stream uses temp stream: https://github.com/php/php-src/blob/99084262c3f56dd8a4efa6fa689441966745440f/main/streams/memory.c#L622
I do wonder whether it shouldn't be better to drop write support there than to document it, as
it doesn't really make sense to me for data streams.
------------------------------------------------------------------------
[2020-04-11 17:50:48] peehaa@php.net
Why would it create a file?
------------------------------------------------------------------------
[2020-04-11 16:13:51] j7ur8 at qq dot com
but it dont create a file.
------------------------------------------------------------------------
[2020-04-11 15:49:47] cmb@php.net
It seems the docs are wrong: <https://3v4l.org/9HKq6>.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=79467
--
Edit this bug report at https://bugs.php.net/bug.php?id=79467&edit=1