diff options
| author | 2016-04-24 14:52:08 +0200 | |
|---|---|---|
| committer | 2016-04-24 14:52:08 +0200 | |
| commit | 152b8171b5570b8a72b840b5c150f49acffea55f (patch) | |
| tree | 36665a9ccde289f81a3978cfe32c47208d2c31a8 /lib | |
| parent | f08d991d1a83868c5035681dae3dc8da2f8b8771 (diff) | |
| parent | 624824673592dbc21300f9a26c27781f54429de5 (diff) | |
Merge pull request #1135 from Alkarex/favicon_bug
Favicon bug
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; |
