mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +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 {
|
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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue