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:
authordiosmosis <diosmosis@users.noreply.github.com>2020-04-09 06:43:07 +0300
committerGitHub <noreply@github.com>2020-04-09 06:43:07 +0300
commit259636154945c2f70571e6e5651a98791c7a4044 (patch)
tree4d64eb59c9c0bc0cbeb4ad88e6b8f57eaaf2e53e /plugins/UserCountry
parent2c5c72e2da4c015efa78069c9c1b407fc55a6483 (diff)
Make sure upgrading from a 3.X or pre- version to 4.X via oneclickupdate works (#15795)
* couple fixes for updating via one-click-update to 4.0 * Fix for updating from 3.x => greater through oneclickupdate (in one case Piwik\Transient\Cache is loaded).
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r--plugins/UserCountry/VisitorGeolocator.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/UserCountry/VisitorGeolocator.php b/plugins/UserCountry/VisitorGeolocator.php
index ba2b884e80..84c384b6ce 100644
--- a/plugins/UserCountry/VisitorGeolocator.php
+++ b/plugins/UserCountry/VisitorGeolocator.php
@@ -305,7 +305,12 @@ class VisitorGeolocator
public static function getDefaultLocationCache()
{
if (self::$defaultLocationCache === null) {
- self::$defaultLocationCache = new Transient();
+ if (class_exists('\Piwik\Cache\Transient')) {
+ // during the oneclickupdate from 3.x => greater, this class will be loaded, so we have to use it instead of the Matomo namespaced one
+ self::$defaultLocationCache = new \Piwik\Cache\Transient();
+ } else {
+ self::$defaultLocationCache = new Transient();
+ }
}
return self::$defaultLocationCache;
}