summaryrefslogtreecommitdiffstats
path: root/utility
diff options
context:
space:
mode:
Diffstat (limited to 'utility')
-rw-r--r--utility/feedfetcher.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php
index 4b91865f5..1f67d328e 100644
--- a/utility/feedfetcher.php
+++ b/utility/feedfetcher.php
@@ -204,7 +204,18 @@ class FeedFetcher implements IFeedFetcher {
// try the /favicon.ico as a last resort
$parseUrl = parse_url($url);
- $baseFavicon = $parseUrl['scheme'] . '://' . $parseUrl['host'] . '/favicon.ico';
+ if (!array_key_exists('scheme', $parseUrl)){
+ $scheme = 'http';
+ } else {
+ $scheme = $parseUrl['scheme'];
+ }
+
+ if(!array_key_exists('host', $parseUrl)){
+ error_log($url);
+ return null;
+ }
+
+ $baseFavicon = $scheme . '://' . $parseUrl['host'] . '/favicon.ico';
if($this->isValidFavIcon($baseFavicon)){
return $baseFavicon;
}