diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-07-11 11:13:11 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-07-11 11:13:11 +0400 |
commit | 50524b0be391d93d16017c2674b7272bce8915e6 (patch) | |
tree | d24c011b89b594e318c8f7fc222033f977942a61 /core/Log.php | |
parent | c10ea19a6fb7e6167db0f30c9d6d3b5aafe76492 (diff) |
Make sure logging doesn't fail during tests.
Diffstat (limited to 'core/Log.php')
-rw-r--r-- | core/Log.php | 4 |
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); } |