From b03108a2ccb5706240ec838b4735ac0f4b57fc60 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 9 Jan 2020 15:22:47 +0100 Subject: [PATCH] Check if header has an index 0 before accessing it Signed-off-by: Christoph Wurst --- src/Favicon/Favicon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Favicon/Favicon.php b/src/Favicon/Favicon.php index 71f76c4..f964137 100644 --- a/src/Favicon/Favicon.php +++ b/src/Favicon/Favicon.php @@ -97,7 +97,7 @@ public function info($url) $loop = TRUE; while ($loop && $max_loop-- > 0) { $headers = $this->dataAccess->retrieveHeader($url); - if (empty($headers)) { + if (empty($headers) || !array_key_exists(0, $headers)) { return false; } $exploded = explode(' ', $headers[0]);