ip2location / ip2location-piwik

IP2Location geolocation service to lookup a visitor's location in Matomo (Piwik) 4.x, 5.x. This service allows you to determine the country, region, city, coordinates, zip code, time zone, ISP, domain, MCC, MNC, mobile brand name, elevation, usage type, address type, IAB category, and more, associated with any given IP address.
http://www.ip2location.com
32 stars 18 forks source link

Fix fread exception when length < 1 #66

Closed MichaelRoosz closed 2 years ago

MichaelRoosz commented 2 years ago

Fixes this exception:

Uncaught exception in plugins/IP2Location/lib/IP2Location.php line 1602: fread(): Argument #2 ($length) must be greater than 0

I think the exception was thrown when processing a IPv6 address, but I am not 100% certain

ip2location commented 2 years ago

May I know the BIN database you are using and the file's date?

Also, are you able to provide me with the IPv6 addresses that you suspect causing the error?

MichaelRoosz commented 2 years ago

Hello @ip2location ,

here is my database version: Database Information IP2LOCATION-LITE-DB11.BIN IP2Location Database File 2022-03-29

I do not know the exact IPv6 address