Skip to content
Snippets Groups Projects
Commit 3239d109 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #8948 from owncloud/fix-logger-race-condition

set logger before registrate to an error handler
parents e5c47a5e 63c5c7bd
Branches
No related tags found
No related merge requests found
...@@ -515,13 +515,13 @@ class OC { ...@@ -515,13 +515,13 @@ class OC {
} }
if (!defined('PHPUNIT_RUN')) { if (!defined('PHPUNIT_RUN')) {
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
if (defined('DEBUG') and DEBUG) { if (defined('DEBUG') and DEBUG) {
OC\Log\ErrorHandler::register(true); OC\Log\ErrorHandler::register(true);
set_exception_handler(array('OC_Template', 'printExceptionErrorPage')); set_exception_handler(array('OC_Template', 'printExceptionErrorPage'));
} else { } else {
OC\Log\ErrorHandler::register(); OC\Log\ErrorHandler::register();
} }
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
} }
// register the stream wrappers // register the stream wrappers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment