maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

Country is missing __isset function, causes issues #7

Closed ctadlock closed 10 years ago

ctadlock commented 10 years ago

The Country class (https://github.com/maxmind/GeoIP2-php/blob/master/src/GeoIp2/Model/Country.php) does not have an __isset() method so any code that tries to check the existance of a property using isset always returns false.

isset($omni->traits) // always false

More info... http://stackoverflow.com/questions/12899547/why-isset-always-returns-false-on-custom-object

oschwald commented 10 years ago

Thanks for the report. We should be able to fix that in the next release.

oschwald commented 10 years ago

We merged a fix for this into master today. Thanks for reporting the issue.