Skip to content

Conversation

@janverton
Copy link
Contributor

Throws an exception with the error_message returned by the API as message instead of returning an empty lat/long

Copy link
Owner

@jeroendesloovere jeroendesloovere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @janverton,
Thanks for your PR.

$response = json_decode($response);

// API returns with an error
if (isset($response->error_message)) throw new GeolocationException($response->error_message);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change it to:

if (isset($response->error_message)) {
    throw new GeolocationException($response->error_message);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure will do, although it breaks convention regarding the rest of the class :)

@jeroendesloovere jeroendesloovere merged commit 20655c7 into jeroendesloovere:master Mar 15, 2018
@jeroendesloovere
Copy link
Owner

Hi @janverton, I just released 1.4.1.

@janverton
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants