|
@@ -93,15 +93,17 @@ class SchedulesBusiness
|
93
|
93
|
throw $e;
|
94
|
94
|
}
|
95
|
95
|
}
|
96
|
|
- $schedules = static::getSchedulesForDate($data["data"]["schedules"], $date);
|
97
|
96
|
|
98
|
97
|
$schedulesCarbon = [];
|
99
|
|
-
|
100
|
|
- for ($i = 0; $i < count($schedules) && $count > 0; ++$i) {
|
101
|
|
- $scheduleDate = Carbon::createFromFormat(static::$timeFormat . " " . static::$dateFormat, $schedules[$i] . " " . $date->toDateString());
|
102
|
|
- if ($scheduleDate->gte($date)) {
|
103
|
|
- --$count;
|
104
|
|
- $schedulesCarbon[] = $scheduleDate;
|
|
98
|
+ if (!is_null($data["data"]["schedules"])) {
|
|
99
|
+ $schedules = static::getSchedulesForDate($data["data"]["schedules"], $date);
|
|
100
|
+
|
|
101
|
+ for ($i = 0; $i < count($schedules) && $count > 0; ++$i) {
|
|
102
|
+ $scheduleDate = Carbon::createFromFormat(static::$timeFormat . " " . static::$dateFormat, $schedules[$i] . " " . $date->toDateString());
|
|
103
|
+ if ($scheduleDate->gte($date)) {
|
|
104
|
+ --$count;
|
|
105
|
+ $schedulesCarbon[] = $scheduleDate;
|
|
106
|
+ }
|
105
|
107
|
}
|
106
|
108
|
}
|
107
|
109
|
|