From d388f6f9b8803e2b110870dc3d40fa64980e9560 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 20 May 2022 14:51:31 +0200 Subject: [PATCH] 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. --- .../files/lib/system/request/RequestHandler.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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(); } } -- 2.20.1