mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-16 14:46:28 +02:00
[ticket/15276] Use stream_copy_to_stream
PHPBB3-15276
This commit is contained in:
@@ -71,13 +71,10 @@ function send_avatar_to_browser($file, $browser)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$fp = $storage->read_stream($file_path);
|
$fp = $storage->read_stream($file_path);
|
||||||
|
$output = fopen('php://output', 'w+b');
|
||||||
while (!feof($fp))
|
stream_copy_to_stream($fp, $output);
|
||||||
{
|
|
||||||
echo fread($fp, 8192);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
fclose($output);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user