diff options
author | Stefan Giehl <stefan@matomo.org> | 2019-01-16 10:12:57 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2019-01-16 10:12:57 +0300 |
commit | 4cf24fdaf8d5bbb2c79ce8d6317de2a2bee6ec18 (patch) | |
tree | fd20aafd5367c8d47e3b2d55cf953fc91fea73de /plugins/UserCountry | |
parent | 4b15e11ff8f39b200c5ca4fa6a41c97d22a870e9 (diff) |
Skip downloading discontinued GeoLite databases without an error (#13959)
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r-- | plugins/UserCountry/GeoIPAutoUpdater.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/UserCountry/GeoIPAutoUpdater.php b/plugins/UserCountry/GeoIPAutoUpdater.php index 4f62fc7ec1..db47feb063 100644 --- a/plugins/UserCountry/GeoIPAutoUpdater.php +++ b/plugins/UserCountry/GeoIPAutoUpdater.php @@ -137,6 +137,11 @@ class GeoIPAutoUpdater extends Task { $url = trim($url); + if (strpos($url, 'GeoLite')) { + Log::info('GeoLite databases have been discontinued. Skipping download of '.$url.'. Consider switching to GeoIP 2.'); + return; + } + $ext = GeoIPAutoUpdater::getGeoIPUrlExtension($url); // NOTE: using the first item in $dbNames[$dbType] makes sure GeoLiteCity will be renamed to GeoIPCity |