diff options
| author | 2014-08-19 21:39:45 +0200 | |
|---|---|---|
| committer | 2014-08-19 21:39:45 +0200 | |
| commit | 0d0b8cd39b8de765aa351a2e66fff850bdcb2000 (patch) | |
| tree | ca3f30f4983cb1b799a175d41a36d267d950892e /app/views | |
| parent | 50075bfbdcd6a7be010eb82ce1fffac0ea283de7 (diff) | |
Error when feed does not exist
https://github.com/marienfressinaud/FreshRSS/issues/579
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 55ef6bdf6..87bf2e22a 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -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 } ?> |
