Browse Source
fix: Do not try to load IAppManager too soon
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/51676/head
Côme Chilliet
10 months ago
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
1 changed files with
2 additions and
3 deletions
-
lib/private/Server.php
|
|
|
@ -604,14 +604,13 @@ class Server extends ServerContainer implements IServerContainer { |
|
|
|
$config = $c->get(SystemConfig::class); |
|
|
|
/** @var ServerVersion $serverVersion */ |
|
|
|
$serverVersion = $c->get(ServerVersion::class); |
|
|
|
$appManager = $c->get(IAppManager::class); |
|
|
|
|
|
|
|
if ($config->getValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { |
|
|
|
$logQuery = $config->getValue('log_query'); |
|
|
|
$prefixClosure = function () use ($logQuery, $serverVersion, $appManager): ?string { |
|
|
|
$prefixClosure = function () use ($logQuery, $serverVersion): ?string { |
|
|
|
if (!$logQuery) { |
|
|
|
try { |
|
|
|
$v = $appManager->getAppInstalledVersions(); |
|
|
|
$v = \OCP\Server::get(IAppManager::class)->getAppVersions(); |
|
|
|
} catch (\Doctrine\DBAL\Exception $e) { |
|
|
|
// Database service probably unavailable
|
|
|
|
// Probably related to https://github.com/nextcloud/server/issues/37424
|
|
|
|
|