mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-15 14:16: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 {
|
||||
$fp = $storage->read_stream($file_path);
|
||||
|
||||
while (!feof($fp))
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
|
||||
$output = fopen('php://output', 'w+b');
|
||||
stream_copy_to_stream($fp, $output);
|
||||
fclose($fp);
|
||||
fclose($output);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user