Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/GeoIp2/GeoIP2AutoUpdater.php5
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));