Fix accessing undefined variable

This commit is contained in:
Björn Fromme
2020-04-01 14:02:33 +02:00
parent 8a56dabc7d
commit e5b36d1b51
@@ -113,7 +113,7 @@ class IcalService implements SingletonInterface
$occupancy = $event->getOccupancy();
}
if (!isset($item['to'])) {
if (isset($event) && !isset($item['to'])) {
$item['to'] = $event->getEnd();
$this->addOccupancyItem($item);
}