mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-01 13:32:31 +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) {
|
if ($out) {
|
||||||
$in = @fopen($tmp_name, "rb");
|
$in = @fopen($tmp_name, "rb");
|
||||||
if ($in) {
|
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 (
|
$response = array (
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'info' => "file upload successful"
|
'info' => "file upload successful"
|
||||||
|
|
Loading…
Reference in a new issue