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
parent
commit
8caa1a70e9
No known key found for this signature in database GPG Key ID: A3E2F658B28C760A
  1. 5
      lib/private/Server.php

5
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

Loading…
Cancel
Save