From 681f55315bde04085621af92ffa39b609813d519 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 25 May 2021 20:21:51 +0200 Subject: [PATCH] Downgrading PHP 7.4 incompatible fread/fwrite checks --- src/Util/HTTPInputData.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Util/HTTPInputData.php b/src/Util/HTTPInputData.php index c1dba263c2..d22c3894d4 100644 --- a/src/Util/HTTPInputData.php +++ b/src/Util/HTTPInputData.php @@ -162,7 +162,7 @@ class HTTPInputData $lastLine = null; while (($chunk = fgets($stream, 8096)) !== false && strpos($chunk, $boundary) !== 0) { if ($lastLine !== null) { - if (fwrite($fileHandle, $lastLine) === false) { + if (!fwrite($fileHandle, $lastLine)) { $error = UPLOAD_ERR_CANT_WRITE; break; } @@ -171,7 +171,7 @@ class HTTPInputData } if ($lastLine !== null && $error !== UPLOAD_ERR_CANT_WRITE) { - if (fwrite($fileHandle, rtrim($lastLine, "\r\n")) === false) { + if (!fwrite($fileHandle, rtrim($lastLine, "\r\n"))) { $error = UPLOAD_ERR_CANT_WRITE; } }