Skip to content

Commit

Permalink
Merge pull request #4 from perfacilis/fix/no-results-crash
Browse files Browse the repository at this point in the history
No longer crash on empty result set
  • Loading branch information
royarisse authored Jul 6, 2021
2 parents ab8bd1a + df5b887 commit b7dd1bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Geocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private function queryEndpoint(array $params): array
throw new Exception(sprintf('Geocoder api returned error: %s', $result['error_message']));
}

if (empty($result['items'])) {
if (empty($result['results'])) {
$status = $result['status'] ?: 'no results';
throw new Exception(sprintf(
'Geocode api returned %s for query %s',
Expand Down

0 comments on commit b7dd1bd

Please sign in to comment.