0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-24 08:56:48 +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 backportbot[bot]
parent 32866bc7ee
commit 23a612ee5e

View file

@ -257,6 +257,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];
}