From 7cb962de82ae7e7a89fc47d0fac637ae3c350c7c Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 28 Dec 2024 12:58:09 +0000 Subject: [PATCH] move Router creation into App::runFrontend() --- src/App.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.php b/src/App.php index 0345eb3adf..f673c2eb39 100644 --- a/src/App.php +++ b/src/App.php @@ -170,7 +170,6 @@ class App $this->mode->setExecutor(Mode::INDEX); $this->runFrontend( - $this->container->create(Router::class), $this->container->create(IManagePersonalConfigValues::class), $this->container->create(Page::class), $this->container->create(Nav::class), @@ -529,7 +528,6 @@ class App * * This probably should change to limit the size of this monster method. * - * @param Router $router * @param IManagePersonalConfigValues $pconfig * @param Page $page The Friendica page printing container * @param ModuleHTTPException $httpException The possible HTTP Exception container @@ -539,7 +537,6 @@ class App * @throws \ImagickException */ private function runFrontend( - Router $router, IManagePersonalConfigValues $pconfig, Page $page, Nav $nav, @@ -675,6 +672,9 @@ class App // Initialize module that can set the current theme in the init() method, either directly or via App->setProfileOwner $page['page_title'] = $moduleName; + /** @var Router $router */ + $router = $this->container->create(Router::class); + // The "view" module is required to show the theme CSS if (!$this->mode->isInstall() && !$this->mode->has(Mode::MAINTENANCEDISABLED) && $moduleName !== 'view') { $module = $router->getModule(Maintenance::class);