added check to prevent unnecessary conversion to seconds

This commit is contained in:
Robbt 2019-03-02 20:36:02 -05:00
parent bc14230281
commit 64e33a235d

View file

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