diff --git a/sources/AppBundle/Controller/Admin/HomeAction.php b/sources/AppBundle/Controller/Admin/HomeAction.php index 186cb3802..80d53d921 100644 --- a/sources/AppBundle/Controller/Admin/HomeAction.php +++ b/sources/AppBundle/Controller/Admin/HomeAction.php @@ -62,7 +62,7 @@ public function __invoke() { $nextevents = $this->eventRepository->getNextEvents(); $cards = []; - if ($this->security->isGranted('ROLE_FORUM')) { + if ($this->security->isGranted('ROLE_FORUM') && $nextevents) { foreach ($nextevents as $event) { $stats = $this->eventStatsRepository->getStats($event->getId()); $info = [];