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:
authordiosmosis <benakamoorthi@fastmail.fm>2014-07-11 11:13:11 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-07-11 11:13:11 +0400
commit50524b0be391d93d16017c2674b7272bce8915e6 (patch)
treed24c011b89b594e318c8f7fc222033f977942a61 /core/Log.php
parentc10ea19a6fb7e6167db0f30c9d6d3b5aafe76492 (diff)
Make sure logging doesn't fail during tests.
Diffstat (limited to 'core/Log.php')
-rw-r--r--core/Log.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Log.php b/core/Log.php
index 8bd2f5b95e..df1ce57c98 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -385,7 +385,9 @@ class Log extends Singleton
return;
}
- if(!@file_put_contents($this->logToFilePath, $message, FILE_APPEND)) {
+ if (!@file_put_contents($this->logToFilePath, $message, FILE_APPEND)
+ && !defined('PIWIK_TEST_MODE')
+ ) {
$message = Filechecks::getErrorMessageMissingPermissions($this->logToFilePath);
throw new \Exception($message);
}