From f071c05a487a41c3813aed63837454772c06aaec Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 30 Nov 2021 21:18:13 +0100 Subject: Fix catching connect exceptions while fetching feed logos #1570 Display the message instead of the response when catching an exception during feed logo fetching. As there is no response and thus no method `getResponse()` in `ConnectException`, this fixes a "call to undefined method"-error that prevented feeds from fetching if fetching the logo resulted in a `ConnectException`. Signed-off-by: Michael Hamann --- CHANGELOG.md | 1 + lib/Fetcher/FeedFetcher.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4df883eee..4abc7b3fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is almost based on [Keep a Changelog](https://keepachangelog.com/en/1 ### Changed ### Fixed +* Fix catching network errors while fetching feed logos. (#1601) # Releases ## [17.0.0] diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php index 5b48070d5..f9d6a7536 100755 --- a/lib/Fetcher/FeedFetcher.php +++ b/lib/Fetcher/FeedFetcher.php @@ -382,7 +382,7 @@ class FeedFetcher implements IFeedFetcher 'An error occurred while trying to download the feed logo of {url}: {error}', [ 'url' => $url, - 'error' => $e->getResponse() ?? 'Unknown' + 'error' => $e->getMessage() ?? 'Unknown' ] ); } -- cgit v1.2.3