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
path: root/misc/cron
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-04-07 03:33:58 +0300
committerdiosmosis <benaka@piwik.pro>2015-04-07 03:33:58 +0300
commit29692df109baf946d65e168dcbcac5601dbadbcd (patch)
tree3615a0e8f1efae4c777dd6bb559eb5488308fe4c /misc/cron
parentedc4a1b6c1850889d8845c66a886958e64f0d69c (diff)
Fixing two more system test failures, including one caused by the static cache in Archive.php never being cleared, and the environment not existing in web archiving.
Diffstat (limited to 'misc/cron')
-rw-r--r--misc/cron/archive.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index 2f0d97a523..a1923e01e4 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -64,14 +64,17 @@ if (isset($_SERVER['argv']) && Piwik\Console::isSupported()) {
if (Piwik\Common::isPhpCliMode()) {
// We can run the archive in CLI with `php-cgi` so we have to configure the container/logger
// just like for CLI
- $container = new \Piwik\Application\Environment('cli');
- $container->init();
+ $environment = new \Piwik\Application\Environment('cli');
+ $environment->init();
/** @var ConsoleHandler $consoleLogHandler */
$consoleLogHandler = StaticContainer::get('Symfony\Bridge\Monolog\Handler\ConsoleHandler');
$consoleLogHandler->setOutput(new ConsoleOutput(OutputInterface::VERBOSITY_VERBOSE));
} else {
// HTTP request: logs needs to be dumped in the HTTP response (on top of existing log destinations)
+ $environment = new \Piwik\Application\Environment(null);
+ $environment->init();
+
/** @var \Monolog\Logger $logger */
$logger = StaticContainer::get('Psr\Log\LoggerInterface');
$handler = new StreamHandler('php://output', Logger::INFO);