Perlkonig / grav-plugin-iplocate

Grav plugin for geolocating visitors
https://www.perlkonig.com/demos/iplocate
MIT License
8 stars 4 forks source link

Change is_null() to !isset() to avoid PHP exception #2

Closed kek91 closed 8 years ago

kek91 commented 8 years ago

Fixes issue #1

In some cases where the $ip variable hasn't been initialized, iplocations will give a notice exception because is_null() only checks that the variable is null, but isset() checks that it has been initialized and is not null.

Perlkonig commented 8 years ago

Thanks for this! I'm not a PHP native, and somehow this never came up in testing.

kek91 commented 8 years ago

Happy I could be of assistance! Thanks for the mention in changelog.md :)