From: Tim Düsterhus Date: Fri, 20 May 2022 12:30:56 +0000 (+0200) Subject: Move local `$controller` variable into a more appropriate "scope" in RequestHandler... X-Git-Tag: 6.0.0_Alpha_1~1259^2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0899048329e3629ee5467fa4c5540386a35a471c;p=GitHub%2FWoltLab%2FWCF.git Move local `$controller` variable into a more appropriate "scope" in RequestHandler::buildRequest() The variable is only referenced in the `else`, move it there to make the data flow clearer. --- diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index f848de4d8f..66eedc9915 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -147,8 +147,6 @@ class RequestHandler extends SingletonFactory $routeData['controller'] = 'index'; } - $controller = $routeData['controller']; - if (isset($routeData['className'])) { $classData = [ 'className' => $routeData['className'], @@ -158,6 +156,8 @@ class RequestHandler extends SingletonFactory unset($routeData['className']); unset($routeData['controller']); } else { + $controller = $routeData['controller']; + if ( $this->isACPRequest() && ($controller === 'login' || $controller === 'index')