From 4eddfb2d5ad587f484ea7652d664590cd9aba57f Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Sun, 16 Oct 2016 20:23:37 +0300 Subject: [PATCH] Skip slots without matching event ID --- schedule/parse.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/schedule/parse.php b/schedule/parse.php index 4ef5deb..b0de0a0 100644 --- a/schedule/parse.php +++ b/schedule/parse.php @@ -46,6 +46,11 @@ foreach ($data['slots'] as $slot_id => $slot) { } $eid = &$slot['event_id']; + + if (!array_key_exists($eid, $data['events'])) { + continue; + } + $event = &$data['events'][$eid]; if (is_null($eid)) {