From 9f3cc87e9e692152f1829c3b4cbfb45c7ac5dce2 Mon Sep 17 00:00:00 2001 From: divinity76 Date: Mon, 10 Apr 2023 19:24:38 +0200 Subject: [PATCH] use feof ref https://github.com/prasathmani/tinyfilemanager/issues/1016#issuecomment-1502081506 --- tinyfilemanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index 7840cb6..c9ed9bb 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -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); }