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 /core/CronArchive.php | |
parent | 5f3edba82bb25036c6f6076156b93e55d4ca71c6 (diff) |
Provide clearer URL error message in CronArchive.
Diffstat (limited to 'core/CronArchive.php')
-rw-r--r-- | core/CronArchive.php | 9 |
1 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) |