Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(weather_status): Fix search address errors when offline
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin authored and backportbot[bot] committed Sep 16, 2024
commit ca5b22a5e8be6c0d9f7e346ab9d6aa0d0dbecc8e
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