Merge pull request #760 from Robbt/fix-schedule-move-bug

added check to prevent unnecessary conversion to seconds
This commit is contained in:
Kyle Robbertze 2019-03-03 19:18:53 +02:00 committed by GitHub
commit d020551740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -858,8 +858,14 @@ final class Application_Model_Scheduler
// default fades are in seconds
// we need to convert to '00:00:00' format
$file['fadein'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadein']);
$file['fadeout'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadeout']);
// added a check to only run the conversion if they are in seconds format
// otherwise php > 7.1 throws errors
if (is_numeric($file['fadein'])) {
$file['fadein'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadein']);
}
if (is_numeric($file['fadeout'])) {
$file['fadeout'] = Application_Common_DateHelper::secondsToPlaylistTime($file['fadeout']);
}
switch ($file["type"]) {
case 0: