From: Tim Düsterhus Date: Fri, 20 May 2022 13:59:57 +0000 (+0200) Subject: Remove dead branch in ControllerMap X-Git-Tag: 6.0.0_Alpha_1~1246^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=709b3ca0665924bca5cf49b83971eb71f0b5e0f3;p=GitHub%2FWoltLab%2FWCF.git Remove dead branch in ControllerMap The `wcf` application will have the landing page as its landing page. --- 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