From 6cf679e04ec4edab71871d88640adc933df08b6b Mon Sep 17 00:00:00 2001 From: Jose Quinteiro Date: Mon, 9 Mar 2020 12:01:05 -0700 Subject: [PATCH 1/2] 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 --- lib/base.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 1d94468565..e0aae986f8 100644 --- a/lib/base.php +++ b/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'); From 6995e98df6b9c35904043c3096241ca5a91e460b Mon Sep 17 00:00:00 2001 From: Jose Quinteiro Date: Mon, 9 Mar 2020 12:59:54 -0700 Subject: [PATCH 2/2] E_ALL already sets E_DEPRECATED Signed-off-by: Jose Quinteiro --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index e0aae986f8..c0feee3d1e 100644 --- a/lib/base.php +++ b/lib/base.php @@ -604,7 +604,7 @@ class OC { // Override php.ini and log everything if we're troubleshooting if (self::$config->getValue('loglevel') === ILogger::DEBUG) { - error_reporting(E_ALL | E_DEPRECATED); + error_reporting(E_ALL); } // Don't display errors and log them