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:
Diffstat (limited to 'core/ArchiveProcessor/PluginsArchiver.php')
-rw-r--r--core/ArchiveProcessor/PluginsArchiver.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/ArchiveProcessor/PluginsArchiver.php b/core/ArchiveProcessor/PluginsArchiver.php
index 4c963e17bc..2b46ea29f6 100644
--- a/core/ArchiveProcessor/PluginsArchiver.php
+++ b/core/ArchiveProcessor/PluginsArchiver.php
@@ -147,7 +147,12 @@ class PluginsArchiver
);
} catch (Exception $e) {
$className = get_class($e);
- $exception = new $className($e->getMessage() . " - caused by plugin $pluginName", $e->getCode(), $e);
+
+ if ($className === 'PHPUnit_Framework_Exception' || (class_exists('PHPUnit_Framework_Exception', false) && is_subclass_of($className, 'PHPUnit_Framework_Exception'))) {
+ $exception = new $className($e->getMessage() . " - caused by plugin $pluginName", $e->getCode(), $e->getFile(), $e->getLine(), $e);
+ } else {
+ $exception = new $className($e->getMessage() . " - caused by plugin $pluginName", $e->getCode(), $e);
+ }
throw $exception;
}