mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-08 08:52:23 +02:00
fix loop early return, and workaround bug
This commit is contained in:
parent
f918b954b8
commit
3e1713e3eb
|
@ -969,7 +969,12 @@ if (!empty($_FILES) && !FM_READONLY) {
|
|||
if ($out) {
|
||||
$in = @fopen($tmp_name, "rb");
|
||||
if ($in) {
|
||||
stream_copy_to_stream($in, $out);
|
||||
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); }
|
||||
} else {
|
||||
stream_copy_to_stream($in, $out);
|
||||
}
|
||||
$response = array (
|
||||
'status' => 'success',
|
||||
'info' => "file upload successful"
|
||||
|
|
Loading…
Reference in a new issue