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