summaryrefslogtreecommitdiffstats
path: root/lib/Fetcher/FeedFetcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fetcher/FeedFetcher.php')
-rwxr-xr-xlib/Fetcher/FeedFetcher.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php
index c37bc129c..365b86848 100755
--- a/lib/Fetcher/FeedFetcher.php
+++ b/lib/Fetcher/FeedFetcher.php
@@ -342,15 +342,18 @@ class FeedFetcher implements IFeedFetcher
$is_image = substr(mime_content_type($favicon_path), 0, 5) === "image";
+ $base_url = new Net_URL2($url);
+ $base_url->setPath('');
+
// check if file is actually an image
if (!$is_image) {
- return $this->faviconFactory->get($url);
+ return $this->faviconFactory->get($base_url->getNormalizedURL());
}
list($width, $height, $type, $attr) = getimagesize($favicon_path);
// check if image is square else fall back to favicon
if ($width !== $height) {
- return $this->faviconFactory->get($url);
+ return $this->faviconFactory->get($base_url);
}
return $favicon;