Commit 62ddd285 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #2767779: Fix Field Caching for Status, but no hours

parent 04e14200
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -223,9 +223,11 @@ class OfficeHoursItemList extends FieldItemList implements OfficeHoursItemListIn
        // Make sure we only receive 1 day, only to calculate the cache.
        $office_hours = $this->getRows($settings, $field_settings, []);
        $next_day = array_shift($office_hours);
        if (!$next_day) {
          return Cache::PERMANENT;
        }

        // Get the difference in hours/minutes between 'now' and next open/closing time.
        $first_time = NULL;
        foreach ($next_day['slots'] as $slot) {
          $start = $slot['start'];
          $end = $slot['end'];