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
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-09-25 04:02:49 +0300
committerGitHub <noreply@github.com>2020-09-25 04:02:49 +0300
commita01eea35273f7c569d060ec455ec0c0de07d1582 (patch)
tree4fe564cdb5ac066752d01f0bc9f9a097bd5825d8 /core
parent7c443e2575f1548a071ddfa59f2620ae968f1c14 (diff)
Prevent upgrade error should a plugin get disabled during the Matomo 4 upgrade (#16468)
Diffstat (limited to 'core')
-rw-r--r--core/API/Proxy.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/API/Proxy.php b/core/API/Proxy.php
index ccd4bfeeaf..cacf4e4ce7 100644
--- a/core/API/Proxy.php
+++ b/core/API/Proxy.php
@@ -18,6 +18,14 @@ use Piwik\Plugin\Manager;
use ReflectionClass;
use ReflectionMethod;
+// prevent upgrade error eg from Matomo 3.x to Matomo 4.x. Refs https://github.com/matomo-org/matomo/pull/16468
+// the `false` is important otherwise it would fail and try to load the proxy.php file again.
+if (!class_exists('Piwik\API\NoDefaultValue', false)) {
+ class NoDefaultValue
+ {
+ }
+}
+
/**
* Proxy is a singleton that has the knowledge of every method available, their parameters
* and default values.