Build OC\Core\Application when running occ or cron to register listeners correctly

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
(cherry picked from commit 63d7e7c798)
This commit is contained in:
Côme Chilliet 2022-02-03 16:12:37 +01:00 committed by Côme Chilliet (Rebase PR Action)
parent 4d4f544929
commit 323f11226d

View file

@ -727,6 +727,8 @@ class OC {
// 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