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:
parent
32866bc7ee
commit
23a612ee5e
1 changed files with 3 additions and 0 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue