From ca5b22a5e8be6c0d9f7e346ab9d6aa0d0dbecc8e Mon Sep 17 00:00:00 2001 From: provokateurin Date: Sun, 15 Sep 2024 22:39:18 +0200 Subject: [PATCH] fix(weather_status): Fix search address errors when offline Signed-off-by: provokateurin --- apps/weather_status/lib/Service/WeatherStatusService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php index ed416d09a87..0ecac2ea57b 100644 --- a/apps/weather_status/lib/Service/WeatherStatusService.php +++ b/apps/weather_status/lib/Service/WeatherStatusService.php @@ -275,6 +275,9 @@ class WeatherStatusService { ]; $url = 'https://nominatim.openstreetmap.org/search'; $results = $this->requestJSON($url, $params); + if ($results['error'] !== null) { + return $results; + } if (count($results) > 0) { return $results[0]; } -- 2.39.5