From 53a85204daf1b542f4d5ddb583a7331fb9fa06bd Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 17 Apr 2012 16:52:59 -0400 Subject: [PATCH] CC-3498: Calendar -> Show Content better representation of duration needed -fixed (check for array length after explode()) --- airtime_mvc/application/models/ShowInstance.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index ea7ef121b..c25f1e2c3 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -570,9 +570,14 @@ class Application_Model_ShowInstance { if ($time != "00:00:00") { $time_arr = explode(".", $time); - $time_arr[1] = "." . $time_arr[1]; - $milliseconds = number_format(round($time_arr[1], 2), 2); - $time = $time_arr[0] . substr($milliseconds, 1); + if (count($time_arr) > 1) { + $time_arr[1] = "." . $time_arr[1]; + $milliseconds = number_format(round($time_arr[1], 2), 2); + $time = $time_arr[0] . substr($milliseconds, 1); + } + else { + $time = $time_arr[0] . ".00"; + } } else { $time = "00:00:00.00"; }