From 7e19a28caf65ddba908dcdd1c5232e45aa139878 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Wed, 6 Nov 2019 13:27:13 +0200 Subject: [PATCH] Expand out currentShowID conditional Fixes: #875 --- airtime_mvc/application/models/Schedule.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 333dbfb4b..3a1be171c 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -104,7 +104,10 @@ SQL; $utcNow = new DateTime("now", new DateTimeZone("UTC")); $shows = Application_Model_Show::getPrevCurrentNext($utcNow, $utcTimeEnd, $showsToRetrieve); - $currentShowID = (is_array($shows['currentShow'] && count($shows['currentShow'])>0))?$shows['currentShow']['instance_id']:null; + $currentShowID = null; + if (is_array($shows['currentShow']) && count($shows['currentShow'])>0) { + $currentShowID = $shows['currentShow']['instance_id']; + } $source = self::_getSource(); $results = Application_Model_Schedule::getPreviousCurrentNextMedia($utcNow, $currentShowID, self::_getSource());