Rename local `$controller` to `$routePart` in ControllerMap::lookupDefaultController()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 22 Jun 2022 13:26:02 +0000 (15:26 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 22 Jun 2022 13:26:02 +0000 (15:26 +0200)
wcfsetup/install/files/lib/system/request/ControllerMap.class.php

index 0cc85bd84217e1f24bc6bd33d500a5648ef49de2..301f86e4ca1d8b72c71ffeba66c38e0a5a460822 100644 (file)
@@ -233,9 +233,9 @@ final class ControllerMap extends SingletonFactory
      */
     public function lookupDefaultController($application): array
     {
-        $controller = $this->landingPages[$application]['routePart'];
+        $routePart = $this->landingPages[$application]['routePart'];
 
-        if (\preg_match('~^__WCF_CMS__(?P<pageID>\d+)$~', $controller, $matches)) {
+        if (\preg_match('~^__WCF_CMS__(?P<pageID>\d+)$~', $routePart, $matches)) {
             $cmsPageData = $this->lookupCmsPage($matches['pageID'], 0);
             if ($cmsPageData === null) {
                 // page is multilingual
@@ -257,7 +257,7 @@ final class ControllerMap extends SingletonFactory
 
         return [
             'application' => $application,
-            'controller' => $controller,
+            'controller' => $routePart,
         ];
     }