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:
-rw-r--r--core/CronArchive.php12
m---------tests/PHPUnit/UI0
2 files changed, 7 insertions, 5 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php
index 8efebd29f7..d36e988832 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -397,7 +397,8 @@ class CronArchive
public function logFatalError($m)
{
$this->logError($m);
- exit(1);
+
+ throw new Exception($m);
}
public function runScheduledTasks()
@@ -1042,7 +1043,7 @@ class CronArchive
}
if (!\Piwik\UrlHelper::isLookLikeUrl($piwikUrl)) {
- $this->logFatalErrorUrlExpected();
+ $this->logFatalErrorUrlExpected($piwikUrl);
}
// ensure there is a trailing slash
@@ -1251,10 +1252,11 @@ class CronArchive
return true;
}
- private function logFatalErrorUrlExpected()
+ private function logFatalErrorUrlExpected($piwikUrl = false)
{
- $this->logFatalError("./console core:archive expects the argument 'url' to be set to your Piwik URL, for example: --url=http://example.org/piwik/ "
- . "\n--help for more information");
+ $this->logFatalError("./console core:archive expects the argument 'url' to be set to your Piwik URL, for example: --url=http://example.org/piwik/"
+ . ($piwikUrl ? "\n '$piwikUrl' supplied" : "")
+ . "\nuse --help for more information");
}
private function getVisitsLastPeriodFromApiResponse($stats)
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
-Subproject 15cd3e0f808e6fb3914f35cfd5f94dfba008ec8
+Subproject 4cdf80fc99025b71e5d8e59419d2af749e466df