Skip to content

Commit

Permalink
fix(weather_status): Fix search address errors when offline
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <kate@provokateurin.de>
  • Loading branch information
provokateurin authored and backportbot[bot] committed Sep 16, 2024
1 parent bbe3b99 commit ca5b22a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/weather_status/lib/Service/WeatherStatusService.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ private function searchForAddress(string $address): array {
];
$url = 'https://nominatim.openstreetmap.org/search';
$results = $this->requestJSON($url, $params);
if ($results['error'] !== null) {
return $results;
}
if (count($results) > 0) {
return $results[0];
}
Expand Down

0 comments on commit ca5b22a

Please sign in to comment.