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 committed Sep 15, 2024
1 parent 4281ce6 commit 51d523a
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 @@ -257,6 +257,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 51d523a

Please sign in to comment.