]> git.mxchange.org Git - friendica.git/commitdiff
replace DI::mode() with container
authorArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 19:15:33 +0000 (19:15 +0000)
committerArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 19:15:33 +0000 (19:15 +0000)
src/App.php

index e0ab61c5ddbec28632fd32131f02da34c6f325d6..79ad712392f756575a3b51246b884da2ac3d0ea6 100644 (file)
@@ -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;
                }