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());