Set error_logging correctly. Fixes #19847

Don't override the error_logging setting from php.ini unless we're
debugging.

Signed-off-by: Jose Quinteiro <github@quinteiro.org>
pull/19867/head
Jose Quinteiro 5 years ago
parent 1f7cb027a4
commit 6cf679e04e
  1. 6
      lib/base.php

@ -602,8 +602,12 @@ class OC {
\OC::$server->getEventLogger()->log('autoloader', 'Autoloader', $loaderStart, $loaderEnd);
\OC::$server->getEventLogger()->start('boot', 'Initialize');
// Override php.ini and log everything if we're troubleshooting
if (self::$config->getValue('loglevel') === ILogger::DEBUG) {
error_reporting(E_ALL | E_DEPRECATED);
}
// Don't display errors and log them
error_reporting(E_ALL | E_STRICT);
@ini_set('display_errors', '0');
@ini_set('log_errors', '1');

Loading…
Cancel
Save