set logger before registrate to an error handler

This commit is contained in:
Morris Jobke 2014-06-09 10:02:23 +02:00
parent e5c47a5e30
commit 63c5c7bd21
1 changed files with 1 additions and 1 deletions

View File

@ -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