CC-3498: Calendar -> Show Content better representation of duration needed

-fixed (check for array length after explode())
This commit is contained in:
denise 2012-04-17 16:52:59 -04:00
parent 5df1fede9f
commit 53a85204da
1 changed files with 8 additions and 3 deletions

View File

@ -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";
}