Skip to content

Commit

Permalink
Ignore http errors when fetching favicons
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Kojaev <alec.kojaev@gmail.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
  • Loading branch information
Grotax and oldnomad committed May 2, 2021
1 parent a624489 commit 385379d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Fetcher/FeedFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ protected function getFavicon(FeedInterface $feed, string $url)

$downloaded = copy(
$favicon,
$favicon_path
$favicon_path,
stream_context_create([ 'http' => [ 'ignore_errors' => true ] ])
);

$is_image = $downloaded && substr(mime_content_type($favicon_path), 0, 5) === "image";
Expand Down

0 comments on commit 385379d

Please sign in to comment.