diff options
author | Michael Hamann <michael@content-space.de> | 2021-11-30 21:18:13 +0100 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2021-11-30 23:39:39 +0100 |
commit | f071c05a487a41c3813aed63837454772c06aaec (patch) | |
tree | b9bb09678bc872c342e0da92619e3c97f3f4ae23 | |
parent | e52dc6a4ae94ff0ac7ffabb6320c895450c28833 (diff) |
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 <michael@content-space.de>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rwxr-xr-x | lib/Fetcher/FeedFetcher.php | 2 |
2 files changed, 2 insertions, 1 deletions
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' ] ); } |