From 175ee00ad5fe1db247a779b059276c0b79258370 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sat, 26 Apr 2025 05:28:55 +0200 Subject: [PATCH] Prevent fetching 4th day daily weather triggering a 404 --- Command/WeatherCommand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Command/WeatherCommand.php b/Command/WeatherCommand.php index b499390..0318383 100644 --- a/Command/WeatherCommand.php +++ b/Command/WeatherCommand.php @@ -177,6 +177,12 @@ class WeatherCommand extends DoctrineCommand { //Set stop day $day = $stop->diff((new \DateTime('now'))->setTime(0, 0, 0))->d + 1; + //Skip 4th day + //XXX: accuweather only allow until 3rd day + if ($day >= 4) { + continue; + } + //Check if zipcode date is set if (!isset($zipcodes[$zipcode][$day])) { $zipcodes[$zipcode][$day] = [ $sessionId => $sessionId ]; -- 2.41.3