diff options
Diffstat (limited to 'lib/Fetcher/FeedFetcher.php')
-rwxr-xr-x | lib/Fetcher/FeedFetcher.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Fetcher/FeedFetcher.php b/lib/Fetcher/FeedFetcher.php index 9e70b62ca..a6ddbacb5 100755 --- a/lib/Fetcher/FeedFetcher.php +++ b/lib/Fetcher/FeedFetcher.php @@ -18,6 +18,7 @@ use Favicon\Favicon; use FeedIo\Feed\ItemInterface; use FeedIo\FeedInterface; use FeedIo\FeedIo; +use FeedIo\Reader\ReadErrorException; use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\ConnectException; @@ -233,6 +234,9 @@ class FeedFetcher implements IFeedFetcher $item = new Item(); $item->setUnread(true); $item->setUrl($parsedItem->getLink()); + if ($parsedItem->getPublicId() == null) { + throw new ReadErrorException("Malformed feed: item has no GUID"); + } $item->setGuid($parsedItem->getPublicId()); $item->setGuidHash(md5($item->getGuid())); |