From caec1ed5767c1d21285a3e5c02b026377bc3b9fd Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 26 Dec 2024 19:15:33 +0000 Subject: [PATCH] replace DI::mode() with container --- src/App.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/App.php b/src/App.php index e0ab61c5dd..79ad712392 100644 --- a/src/App.php +++ b/src/App.php @@ -444,13 +444,16 @@ class App $this->registerErrorHandler(); - DI::mode()->setExecutor(Mode::WORKER); + /** @var Mode */ + $mode = $this->container->create(Mode::class); + + $mode->setExecutor(Mode::WORKER); // Check the database structure and possibly fixes it Update::check(DI::basePath(), true); // Quit when in maintenance - if (!DI::mode()->has(Mode::MAINTENANCEDISABLED)) { + if (!$mode->has(Mode::MAINTENANCEDISABLED)) { return; }