diff options
author | sgiehl <stefan@matomo.org> | 2020-05-11 15:44:48 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2020-05-11 15:44:48 +0300 |
commit | b348ca2d9d977dad03a2f031f8bedc1f31930a94 (patch) | |
tree | 2dbba6a81eb0aa0af7be38e5b44d6f21e45ef0e8 /plugins/GeoIp2 | |
parent | 8b21dbf2cfb06e9c9ed9ecbbd07e3b6b386bba3b (diff) |
fix geoip2update
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r-- | plugins/GeoIp2/GeoIP2AutoUpdater.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php index 989c1bb5c9..c093bfcd6f 100644 --- a/plugins/GeoIp2/GeoIP2AutoUpdater.php +++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php @@ -591,6 +591,11 @@ class GeoIP2AutoUpdater extends Task try { // check database directly, as location provider ignores invalid database errors $pathToDb = LocationProviderGeoIp2::getPathToGeoIpDatabase($customNames[$type]); + + if (empty($pathToDb)) { + continue; // skip, as no database for this type is available + } + $reader = new Reader($pathToDb); $location = $provider->getLocation(array('ip' => LocationProviderGeoIp2::TEST_IP)); |