diff options
-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)); |