Handle failing to fetch blog posts. Fixes #1878

This commit is contained in:
James Brooks
2016-06-03 14:00:23 +01:00
parent 715eb02844
commit c8b602d349
3 changed files with 17 additions and 8 deletions

View File

@@ -67,9 +67,11 @@ class DashboardController extends Controller
$components = Component::orderBy('order')->get();
$incidents = $this->getIncidents();
$subscribers = $this->getSubscribers();
$feed = $this->feed->entries();
$entries = array_slice($feed->channel->item, 0, 5);
$entries = null;
if ($feed = $this->feed->entries()) {
$entries = array_slice($feed->channel->item, 0, 5);
}
return View::make('dashboard.index')
->withPageTitle(trans('dashboard.dashboard'))