1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-08 18:05:17 +02:00

[ticket/15305] Use php://temp stream instead of tmpfile()

The tmpfile() return a file resource, but is not in binary mode.

PHPBB3-15305
This commit is contained in:
Rubén Calvo 2017-08-08 11:24:20 +02:00
parent 4a4e5d13b1
commit 98ad1e4971

View File

@ -170,7 +170,7 @@ class storage
else
{
// Simulate the stream
$stream = tmpfile();
$stream = fopen('php://temp', 'w+b');
fwrite($stream, $adapter->get_contents($path));
rewind($stream);
}