From 323f11226dc9dc9d0195855b465e72ec6339f1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 3 Feb 2022 16:12:37 +0100 Subject: [PATCH] Build OC\Core\Application when running occ or cron to register listeners correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet (cherry picked from commit 63d7e7c798f6a6cbd56642a287673532b991c5ac) --- lib/base.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/base.php b/lib/base.php index 2e6e2a65d80fc..3d9cca12a5a26 100644 --- a/lib/base.php +++ b/lib/base.php @@ -727,6 +727,8 @@ public static function init() { // Make sure that the application class is not loaded before the database is setup if ($systemConfig->getValue("installed", false)) { OC_App::loadApp('settings'); + /* Build core application to make sure that listeners are registered */ + self::$server->get(\OC\Core\Application::class); } //make sure temporary files are cleaned up