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 <[email protected]>
  • Loading branch information
provokateurin authored and Altahrim committed Oct 2, 2024
1 parent 547bc56 commit 3b986c9
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 3b986c9

Please sign in to comment.