diff options
| author | 2016-04-23 21:35:09 +0200 | |
|---|---|---|
| committer | 2016-04-23 21:35:09 +0200 | |
| commit | f3696784ea0acd15a11a4ca193abe623fd77dc33 (patch) | |
| tree | 874fd230f3394d7eb59ae7ea7feeaf9474cf2ccf /lib | |
| parent | 4862652585da1d69d62914659011c53146b21c17 (diff) | |
Favicon array bug
Case problem and isset check
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Favicon/DataAccess.php | 3 | ||||
| -rw-r--r-- | lib/Favicon/Favicon.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Favicon/DataAccess.php b/lib/Favicon/DataAccess.php index 2bfdf640e..17f26b333 100644 --- a/lib/Favicon/DataAccess.php +++ b/lib/Favicon/DataAccess.php @@ -15,7 +15,8 @@ class DataAccess { public function retrieveHeader($url) { $this->set_context(); - return @get_headers($url, TRUE); + $headers = @get_headers($url, 1); + return array_change_key_case($headers); } public function saveCache($file, $data) { diff --git a/lib/Favicon/Favicon.php b/lib/Favicon/Favicon.php index 7ea6ccf16..1912050d6 100644 --- a/lib/Favicon/Favicon.php +++ b/lib/Favicon/Favicon.php @@ -99,7 +99,7 @@ class Favicon switch ($status) { case '301': case '302': - $url = $headers['Location']; + $url = isset($headers['location']) ? $headers['location'] : ''; break; default: $loop = FALSE; |
