diff --git a/schedule/parse.php b/schedule/parse.php index 87d6f40..3f7d5d1 100644 --- a/schedule/parse.php +++ b/schedule/parse.php @@ -23,6 +23,10 @@ function parseData($config, $data) { $moments = []; + $data['slots'] = array_filter($data['slots'], function($slot) { + return isset($slot['starts_at'], $slot['ends_at'], $slot['hall_id'], $slot['event_id']); + }); + $data['slots'] = array_map(function($slot) { $slot['start'] = date('d.m H:i', $slot['starts_at']); $slot['end'] = date('d.m H:i', $slot['ends_at']); @@ -135,7 +139,7 @@ function parseData($config, $data) { $hasEvents = false; foreach ($events as $hall_index => $event) { - if (is_null($event['event_id'])) { + if (is_null($event['event_id']) || !array_key_exists($event['event_id'], $data['events'])) { $columns[] = '