diff --git a/app/controllers/calendar/schedule.php b/app/controllers/calendar/schedule.php index c20fbea88c8a12bf7bd695642d9c994647faf7e4..ae6d2cb98aadb7787324df5de8bbfc8fafa0d666 100644 --- a/app/controllers/calendar/schedule.php +++ b/app/controllers/calendar/schedule.php @@ -245,7 +245,11 @@ class Calendar_ScheduleController extends AuthenticatedController $this->render_template('calendar/schedule/_entry_course'); } else if ($id) { $entry_columns = CalendarScheduleModel::getScheduleEntries($GLOBALS['user']->id, 0, 0, $id); - $entries = array_pop($entry_columns)->getEntries(); + $entries = []; + $entry_columns = array_pop($entry_columns); + if ($entry_columns) { + $entries = $entry_columns->getEntries(); + } $this->show_entry = array_pop($entries); $this->render_template('calendar/schedule/_entry_schedule'); }