Merge pull request #744 from Robbt/fix-count-warning-in-schedule

Fix count warning in schedule
This commit is contained in:
Kyle Robbertze 2019-02-19 12:28:19 +02:00 committed by GitHub
commit 978a5865e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ SQL;
$utcNow = new DateTime("now", new DateTimeZone("UTC"));
$shows = Application_Model_Show::getPrevCurrentNext($utcNow, $utcTimeEnd, $showsToRetrieve);
$currentShowID = count($shows['currentShow'])>0?$shows['currentShow']['instance_id']:null;
$currentShowID = (is_array($shows['currentShow'] && count($shows['currentShow'])>0))?$shows['currentShow']['instance_id']:null;
$source = self::_getSource();
$results = Application_Model_Schedule::getPreviousCurrentNextMedia($utcNow, $currentShowID, self::_getSource());