Remove dead branch in ControllerMap
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 20 May 2022 13:59:57 +0000 (15:59 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 May 2022 11:46:50 +0000 (13:46 +0200)
The `wcf` application will have the landing page as its landing page.

wcfsetup/install/files/lib/system/request/ControllerMap.class.php

index 2f8c6bbbc601a9a200dea4960126d37bd903e26a..ce72cfd50c7444b5fc2370e52e6aeee0bda693e0 100644 (file)
@@ -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<pageID>\d+)$~', $controller, $matches)) {
+        if (\preg_match('~^__WCF_CMS__(?P<pageID>\d+)$~', $controller, $matches)) {
             $cmsPageData = $this->lookupCmsPage($matches['pageID'], 0);
             if ($cmsPageData === null) {
                 // page is multilingual, use the language id that matches the URL