From fd4da7564a9c180ca3bbda04e2da34faa645b322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Mat=C4=9Bj=C4=8Dek?= Date: Mon, 13 Nov 2023 07:23:55 +0100 Subject: [PATCH] Queue: fix type --- src/Utils/Queue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/Queue.php b/src/Utils/Queue.php index 383676c..371d453 100644 --- a/src/Utils/Queue.php +++ b/src/Utils/Queue.php @@ -57,7 +57,7 @@ private function detectDownloadResponse(ResponseInterface $response): void /* @var $contentTypeHeaders array */ $contentTypeHeaders = $response->getHeader('Content-Type'); $contentType = array_shift($contentTypeHeaders); - if (str_contains($contentType, 'text/xml')) { + if ($contentType !== null && str_contains($contentType, 'text/xml')) { $xmlResponse = $this->createXmlResponse($response); throw new Exceptions\ServiceUnavailable($xmlResponse->status(), $xmlResponse->code());