diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index 37a81f5f6..d2f46954e 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -255,18 +255,18 @@ class Application_Service_HistoryService $timezoneLocal = new DateTimeZone($this->timezone); $boolCast = array(); - foreach ($fields as $index=>$field) { - + foreach ($fields as $index=>$field) { + if ($field["type"] == TEMPLATE_BOOLEAN) { - $boolCast[] = $field["name"]; - } + $boolCast[] = $field["name"]; + } } //need to display the results in the station's timezone. foreach ($rows as $index => &$result) { - foreach ($boolCast as $name) { - $result[$name] = (bool) $result[$name]; + foreach ($boolCast as $name) { + $result[$name] = (bool) $result[$name]; } $dateTime = new DateTime($result["starts"], $timezoneUTC);