Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for existing countrycode before assigning it #56

Merged
merged 3 commits into from
Aug 18, 2020

Conversation

ryanshoover
Copy link
Contributor

On a development site with no geos set, if I call WPEngine\GeoIp::instance()->continent(), I'll get a notice thrown about a non-existent array value.

This PR checks that the array value isn't empty before trying to assign it.

@ryanshoover ryanshoover self-assigned this Aug 13, 2020
Copy link
Member

@nateinaction nateinaction left a comment

Choose a reason for hiding this comment

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

Can you increment the plugin version as well? Like this: /~https://github.com/wpengine/geoip/pull/51/files

@ryanshoover
Copy link
Contributor Author

@nateinaction Version incremented!

Copy link
Member

@nateinaction nateinaction left a comment

Choose a reason for hiding this comment

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

Nice!

@ryanshoover ryanshoover merged commit 23127b7 into master Aug 18, 2020
@ryanshoover ryanshoover deleted the nojira-fix-continent-notice branch August 18, 2020 18:50
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