diff --git a/index.php b/index.php index f670d2b..60ada8d 100644 --- a/index.php +++ b/index.php @@ -74,7 +74,7 @@ foreach ($data->list as $line) { $rainArr = (array) ($line->rain ?? []); $snowArr = (array) ($line->snow ?? []); $rain = ($rainArr['3h'] ?? 0) + ($snowArr['3h'] ?? 0); - + $wind = $line->wind->speed; $flying = $rain === 0 && $wind < 2.5 ? 'Y' : $rain <= 0.3 && $wind < 3.1 ? 'M' @@ -112,7 +112,7 @@ foreach($list as $line) { $dayGroup[] = $line; } else { $grouped[] = $dayGroup; - $dayGroup = []; + $dayGroup = [$line]; $lastDay = $dayStr; } }