mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15276] Use stream_copy_to_stream
PHPBB3-15276
This commit is contained in:
parent
87229e1a77
commit
28060a8468
1 changed files with 3 additions and 6 deletions
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue