diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index 9e5cfc919f10d..ee0ea053dcfe6 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -82,7 +82,7 @@ private function dnsResolve(string $target, int $recursionCount) : array { $dnsResponses = dns_get_record($target, $dnsType); $canHaveCnameRecord = true; - if (count($dnsResponses) > 0) { + if ($dnsResponses !== false && count($dnsResponses) > 0) { foreach ($dnsResponses as $dnsResponse) { if (isset($dnsResponse['ip'])) { $targetIps[] = $dnsResponse['ip'];