summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGioele Falcetti <thegio.f@gmail.com>2020-08-30 19:41:24 +0200
committerBenjamin Brahmer <info@b-brahmer.de>2020-08-31 00:59:43 +0200
commitbf0e693e238de173524fee0fa5267698bfab7a3d (patch)
tree94e4da0e44f2bb9ab44e3f1b7ae69438fc59afeb
parent8dc21e1e1610deab3a5923a24d79be194592ca56 (diff)
Fix crash if full-text is enabled and the news item does not provide an URL to be fetched
Signed-off-by: Gioele Falcetti <thegio.f@gmail.com>
-rwxr-xr-xlib/Fetcher/FeedFetcher.php5
1 files 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);
}