Skip to content

Commit

Permalink
Check if header has an index 0 before accessing it
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Jan 9, 2020
1 parent 50fd2a0 commit b03108a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Favicon/Favicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit b03108a

Please sign in to comment.