diff options
author | diosmosis <benaka@piwik.pro> | 2014-12-16 04:07:05 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-12-16 04:07:05 +0300 |
commit | 3fe19974b4a9a24583f41852fcba42c386d900f3 (patch) | |
tree | 1aaec926d8ea476ba8a9700e0c095feca2da1a35 | |
parent | 5f3edba82bb25036c6f6076156b93e55d4ca71c6 (diff) |
Provide clearer URL error message in CronArchive.
-rw-r--r-- | core/CronArchive.php | 9 | ||||
m--------- | tests/PHPUnit/UI | 0 |
2 files changed, 5 insertions, 4 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 2a6d5be166..9cf56dbf8e 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -1006,7 +1006,7 @@ class CronArchive } if (!\Piwik\UrlHelper::isLookLikeUrl($piwikUrl)) { - $this->logFatalErrorUrlExpected(); + $this->logFatalErrorUrlExpected($piwikUrl); } // ensure there is a trailing slash @@ -1215,10 +1215,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 |