diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-09-25 04:02:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 04:02:49 +0300 |
commit | a01eea35273f7c569d060ec455ec0c0de07d1582 (patch) | |
tree | 4fe564cdb5ac066752d01f0bc9f9a097bd5825d8 /core | |
parent | 7c443e2575f1548a071ddfa59f2620ae968f1c14 (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.php | 8 |
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. |