From f23ed5e0eaaec63903e92e61f1124209c8a33155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 29 Jan 2018 13:15:05 +0100 Subject: [PATCH] Make sure we don't query the AppManager before the installation started MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we end up with the database not being instantiated Signed-off-by: Julius Härtl --- lib/base.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/base.php b/lib/base.php index 444c0df7e9e..f7dd3025b71 100644 --- a/lib/base.php +++ b/lib/base.php @@ -723,8 +723,11 @@ class OC { self::registerAccountHooks(); self::registerSettingsHooks(); - $settings = new \OC\Settings\Application(); - $settings->register(); + // Make sure that the application class is not loaded before the database is setup + if ($systemConfig->getValue("installed", false)) { + $settings = new \OC\Settings\Application(); + $settings->register(); + } //make sure temporary files are cleaned up $tmpManager = \OC::$server->getTempManager();