matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.92k stars 2.66k forks source link

Prevent unusable location provider from breaking the login process #22740

Closed mneudert closed 2 weeks ago

mneudert commented 2 weeks ago

Description:

When testing #22718 in a different environment, my geolocation setup was incomplete. The provider was configured, but the database was missing.

This resulted in a broken login process because LocationProvider::getCurrentProvider() returned a null.

I also changed the check for supported location info to prevent a potential "Undefined index: country_code" warning. With the GeoIp2 provider this could happen if there is only an ISP database available, but no "regular" database.

Review