]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(weather_status): Fix search address errors when offline backport/48050/stable29 48075/head
authorprovokateurin <kate@provokateurin.de>
Sun, 15 Sep 2024 20:39:18 +0000 (22:39 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 16 Sep 2024 09:33:01 +0000 (09:33 +0000)
Signed-off-by: provokateurin <kate@provokateurin.de>
apps/weather_status/lib/Service/WeatherStatusService.php

index ed416d09a87f2c41260a3ede06e5d16fe1bb1873..0ecac2ea57b6ac74a9c3ef56fdc4d2d11a7777aa 100644 (file)
@@ -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];
                }