mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-17 21:16:38 +02:00
use feof
ref https://github.com/prasathmani/tinyfilemanager/issues/1016#issuecomment-1502081506
This commit is contained in:
parent
3e1713e3eb
commit
9f3cc87e9e
|
@ -971,7 +971,7 @@ if (!empty($_FILES) && !FM_READONLY) {
|
|||
if ($in) {
|
||||
if (PHP_VERSION_ID < 80009) {
|
||||
// workaround https://bugs.php.net/bug.php?id=81145
|
||||
while (!in_array($buff = fread($in, 4096), array("", false), true)) { fwrite($out, $buff); }
|
||||
while (!feof($in)) { fwrite($out, fread($in, 4096)); }
|
||||
} else {
|
||||
stream_copy_to_stream($in, $out);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue