Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Notice about non object #34

Closed
dopesong opened this issue Jan 29, 2016 · 4 comments
Closed

Notice about non object #34

dopesong opened this issue Jan 29, 2016 · 4 comments

Comments

@dopesong
Copy link

geoip_record_by_addr returned value might be null, but some methods like geoip_country_code_by_addr checks for exact false returned value.

if ($record !== false) {

@oschwald
Copy link
Member

I do agree that this seems suspicious. Are you getting an actual failure from this though? As far as I can tell, the code in question dates back to at least 2007 and I am not aware of any reports of issues due to it.

@dopesong
Copy link
Author

Yeah we got this on some ips:

Notice: Trying to get property of non-object in /home/test/wp-content/plugins/proxies-plugin/vendor/geoip/geoip/src/geoip.inc on line 1639

2shortplanks added a commit that referenced this issue Jan 29, 2016
Do not use false-y value as an object. Closes  #34.
@oschwald
Copy link
Member

Thanks! I released 1.16 with a fix.

@dopesong
Copy link
Author

Glad to know it's fixed. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants