0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-03-13 07:53:51 +00:00

fix(weather_status): Fix search address errors when offline

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2024-09-15 22:39:18 +02:00 committed by Benjamin Gaussorgues
parent 547bc567d6
commit 3b986c952c

View 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];
}