Skip to content

Commit

Permalink
Check if headers have an index 0 before accessing it (#10)
Browse files Browse the repository at this point in the history
Check if headers have an index 0 before accessing it
  • Loading branch information
ArthurHoaro authored Jan 9, 2020
2 parents b92429e + b03108a commit 3468cca
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 3468cca

Please sign in to comment.