Bug #79467 [NEW]: file_put_contents can't create file with data:// wrappers
| From: | j7ur8 at qq dot com | Date: | Sat, 11 Apr 2020 15:11:31 +0000 |
| Subject: | Bug #79467 [NEW]: file_put_contents can't create file with data:// wrappers | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-226535@lists.php.net to get a copy of this message | ||
From: j7ur8 at qq dot com
Operating system: windows Linux
PHP version: 7.4.4
Package: Streams related
Bug Type: Bug
Bug description:file_put_contents can't create file with data:// wrappers
Description:
------------
file_put_contents ( string $filename , mixed $data [, int $flags = 0 [,
resource $context ]] ) : int
1. above is the function details
2. And when the params of
filename in file_put_contents starts with
data:// , php will execute it successful, but create a file.
Test script:
---------------
<?php
echo file_put_contents('data://text/plain,cccc', 'data');
?>
Expected result:
----------------
4 ; and create a file names 'ccc'
Actual result:
--------------
4; and do not create any file.
--
Edit bug report at https://bugs.php.net/bug.php?id=79467&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79467&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79467&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79467&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79467&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79467&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79467&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79467&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79467&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79467&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79467&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79467&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79467&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79467&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79467&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79467&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79467&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79467&r=mysqlcfg