Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.09k stars 372 forks source link

Caching null location #77

Closed davidlawson closed 5 years ago

davidlawson commented 7 years ago

https://github.com/Torann/laravel-geoip/blob/master/src/GeoIP.php#L135

When getLocation is called with no $ip, null is cached to the location of $this->getClientIP(). I think the $ip = $ip ?: $this->remote_ip; check needs to go above the cache check.