diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-03-31 07:31:48 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-03-31 07:31:48 +0400 |
commit | 5f0c11f6a248825a8d2933baee6938317c91dca8 (patch) | |
tree | b63a6a6dd8b01b0a65a1ad367e6b872b57ab7b5a /core/Log.php | |
parent | 319e85e2d57f7f80e799f7d8180cbd35e462e239 (diff) |
before accessing log, try to access another property to make sure config is initialized...
Diffstat (limited to 'core/Log.php')
-rw-r--r-- | core/Log.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/Log.php b/core/Log.php index 93b56e14e3..a718bafcd4 100644 --- a/core/Log.php +++ b/core/Log.php @@ -167,6 +167,14 @@ class Log extends Singleton */ protected function __construct() { + /** + * access a property that is not overriden by TestingEnvironment before accessing log as the + * log section is used in TestingEnvironment. Otherwise access to magic __get('log') fails in + * TestingEnvironment as it tries to acccess it already here with __get('log'). + * $config->log ==> __get('log') ==> Config.createConfigInstance ==> nested __get('log') ==> returns null + */ + $initConfigToPreventErrorWhenAccessingLog = Config::getInstance()->mail; + $logConfig = Config::getInstance()->log; $this->setCurrentLogLevelFromConfig($logConfig); $this->setLogWritersFromConfig($logConfig); |