Skip to content

Commit 62bff51

Browse files
Merge pull request #30037 from nextcloud/backport/30028/stable23
[stable23] Fix log_query config flag
2 parents e3ee81d + a361e69 commit 62bff51

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/private/Server.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,16 @@ public function __construct($webRoot, \OC\Config $config) {
688688
$config = $c->get(\OCP\IConfig::class);
689689

690690
if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
691-
$v = \OC_App::getAppVersions();
691+
if (!$config->getSystemValueBool('log_query')) {
692+
$v = \OC_App::getAppVersions();
693+
} else {
694+
// If the log_query is enabled, we can not get the app versions
695+
// as that does a query, which will be logged and the logging
696+
// depends on redis and here we are back again in the same function.
697+
$v = [
698+
'log_query' => 'enabled',
699+
];
700+
}
692701
$v['core'] = implode(',', \OC_Util::getVersion());
693702
$version = implode(',', $v);
694703
$instanceId = \OC_Util::getInstanceId();

0 commit comments

Comments
 (0)