Despite the docs claiming that data: wrappers would not be writable[1],
they are implemented as writing to a memory stream. That does not seem
to be particularly sensible, so we disallow writing altogether.
[1] <https://www.php.net/manual/en/wrappers.data.php#refsect1-wrappers.data-options>
(cmb)
. Use SSE2 instructions do locale independent strtolower. (Laruence)
. Fixed bug #79521 (Check __set_state structure). (carusogabriel)
+ . Fixed bug #79467 (data:// wrappers are writable). (cmb)
- BZ2:
. Fixed bug #71263 (fread() does not report bzip2.decompress errors). (cmb)
. Disabled functions are now treated exactly like non-existent functions.
Calling a disabled function will report it as unknown, and redefining a
disabled function is now possible.
+ . data: wrappers are no longer writable, what matches the documented behavior.
- COM:
. Removed the ability to import case-insensitive constants from type
--- /dev/null
+--TEST--
+Bug #79467 (data:// wrappers are writable)
+--FILE--
+<?php
+var_dump(file_put_contents('data://text/plain,cccc', 'data'));
+?>
+--EXPECTF--
+Notice: file_put_contents(): Stream is not writable in %s on line %d
+bool(false)
/* }}} */
PHPAPI const php_stream_ops php_stream_rfc2397_ops = {
- php_stream_temp_write, php_stream_temp_read,
+ NULL, php_stream_temp_read,
php_stream_temp_close, php_stream_temp_flush,
"RFC2397",
php_stream_temp_seek,