From bf0e693e238de173524fee0fa5267698bfab7a3d Mon Sep 17 00:00:00 2001 From: Gioele Falcetti Date: Sun, 30 Aug 2020 19:41:24 +0200 Subject: Fix crash if full-text is enabled and the news item does not provide an URL to be fetched Signed-off-by: Gioele Falcetti --- lib/Fetcher/FeedFetcher.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php index 82ad86352..c06b81b52 100755 --- a/lib/Fetcher/FeedFetcher.php +++ b/lib/Fetcher/FeedFetcher.php @@ -119,9 +119,10 @@ class FeedFetcher implements IFeedFetcher $body = null; $currRTL = $RTL; - // Scrape content if enabled + // Scrape the content if full-text is enabled and if the feed provides a URL if ($fullTextEnabled) { - if ($this->scraper->scrape($item->getLink())) { + $itemLink = $item->getLink(); + if ($itemLink !== null && $this->scraper->scrape($itemLink)) { $body = $this->scraper->getContent(); $currRTL = $this->scraper->getRTL($currRTL); } -- cgit v1.2.3