From: Tim Düsterhus Date: Fri, 20 May 2022 12:51:31 +0000 (+0200) Subject: Clean up `$classData` in RequestHandler::buildRequest() X-Git-Tag: 6.0.0_Alpha_1~1259^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d388f6f9b8803e2b110870dc3d40fa64980e9560;p=GitHub%2FWoltLab%2FWCF.git Clean up `$classData` in RequestHandler::buildRequest() Since the recent changes only the `className` member of this array was access. Simplify this to a simple `$className` variable. --- diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index bdded4e213..c5ae62979c 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -148,10 +148,7 @@ final class RequestHandler extends SingletonFactory } if (isset($routeData['className'])) { - $classData = [ - 'className' => $routeData['className'], - 'controller' => $routeData['controller'], - ]; + $className = $routeData['className']; } else { $controller = $routeData['controller']; @@ -186,6 +183,8 @@ final class RequestHandler extends SingletonFactory ); if (\is_string($classData)) { $this->redirect($routeData, $application, $classData); + } else { + $className = $classData['className']; } } @@ -206,13 +205,13 @@ final class RequestHandler extends SingletonFactory } $this->activeRequest = new Request( - $classData['className'], + $className, $metaData ); if (!$this->isACPRequest()) { // determine if current request matches the landing page - if (ControllerMap::getInstance()->isLandingPage($classData['className'], $metaData)) { + if (ControllerMap::getInstance()->isLandingPage($className, $metaData)) { $this->activeRequest->setIsLandingPage(); } }