mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-25 05:37:56 -05:00
Error when feed does not exist
https://github.com/marienfressinaud/FreshRSS/issues/579
This commit is contained in:
@@ -28,6 +28,12 @@ class FreshRSS_Feed extends Minz_Model {
|
||||
}
|
||||
}
|
||||
|
||||
public static function example() {
|
||||
$f = new FreshRSS_Feed('http://example.net/', false);
|
||||
$f->faviconPrepare();
|
||||
return $f;
|
||||
}
|
||||
|
||||
public function id() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,12 @@ if (!empty($this->entries)) {
|
||||
}
|
||||
}
|
||||
$feed = FreshRSS_CategoryDAO::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache
|
||||
if (empty($feed)) $feed = $item->feed (true);
|
||||
if ($feed == null) {
|
||||
$feed = $item->feed(true);
|
||||
if ($feed == null) {
|
||||
$feed = FreshRSS_Feed::example();
|
||||
}
|
||||
}
|
||||
?><li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li>
|
||||
<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
|
||||
<?php if ($topline_date) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user