Skip to content

Commit

Permalink
Merge pull request matryer#1507 from sprak3000/issue-719-simple-rss-r…
Browse files Browse the repository at this point in the history
…eader-empty-feed-bug

Issue matryer#719 - Simple RSS reader throws error if feed returns empty string.
  • Loading branch information
matryer authored Dec 11, 2020
2 parents 47f79a9 + 3747d18 commit 35d25fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Web/RSSReader/rss.15m.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ public function load($url)
$this->loadLogData();

$feed_data = @file_get_contents(FEED_URL);

if ($feed_data === '') {
$this->title = 'No new items at this time.';
return;
}

$this->feed = new DOMDocument();
$this->feed->loadXML($feed_data);

Expand Down

0 comments on commit 35d25fb

Please sign in to comment.