From e3eb3c1b061f7682c38e6f87179274991a305f5b Mon Sep 17 00:00:00 2001 From: darthf1 Date: Mon, 21 Mar 2022 16:37:29 +0100 Subject: [PATCH] fix: do not pass null to strpos (#384) strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated --- src/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Request.php b/src/Request.php index 76a1fc8..c6df760 100644 --- a/src/Request.php +++ b/src/Request.php @@ -213,7 +213,7 @@ public function isPartial(): bool */ public function isFinal(): bool { - return false !== strpos($this->header('Upload-Concat'), Server::UPLOAD_TYPE_FINAL . ';'); + return null !== ($header = $this->header('Upload-Concat')) && false !== strpos($header, Server::UPLOAD_TYPE_FINAL . ';'); } /**