From 709b3ca0665924bca5cf49b83971eb71f0b5e0f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 20 May 2022 15:59:57 +0200 Subject: [PATCH] Remove dead branch in ControllerMap The `wcf` application will have the landing page as its landing page. --- .../files/lib/system/request/ControllerMap.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php index 2f8c6bbbc6..ce72cfd50c 100644 --- a/wcfsetup/install/files/lib/system/request/ControllerMap.class.php +++ b/wcfsetup/install/files/lib/system/request/ControllerMap.class.php @@ -249,17 +249,15 @@ class ControllerMap extends SingletonFactory * Lookups default controller for given application. * * @param string $application application identifier - * @return null|string[] default controller + * @return string[] default controller * @throws SystemException */ - public function lookupDefaultController($application) + public function lookupDefaultController($application): array { $data = $this->landingPages[$application]; $controller = $data[1]; - if ($application === 'wcf' && empty($controller)) { - return null; - } elseif (\preg_match('~^__WCF_CMS__(?P\d+)$~', $controller, $matches)) { + if (\preg_match('~^__WCF_CMS__(?P\d+)$~', $controller, $matches)) { $cmsPageData = $this->lookupCmsPage($matches['pageID'], 0); if ($cmsPageData === null) { // page is multilingual, use the language id that matches the URL -- 2.20.1