From 55f3452e2dafbe2709cbb4a579c9f7686ffb9206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Wed, 9 Aug 2017 12:29:22 +0200 Subject: [PATCH] [ticket/15305] Use streams in filespec PHPBB3-15305 --- phpBB/phpbb/files/filespec_storage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/files/filespec_storage.php b/phpBB/phpbb/files/filespec_storage.php index b4042ebf10..c39c47dc38 100644 --- a/phpBB/phpbb/files/filespec_storage.php +++ b/phpBB/phpbb/files/filespec_storage.php @@ -447,7 +447,9 @@ class filespec_storage try { - $storage->put_contents($this->destination_file, file_get_contents($this->filename)); + $fp = fopen($this->filename, 'rb'); + $storage->write_stream($this->destination_file, $fp); + fclose($fp); } catch (\phpbb\storage\exception\exception $e) {