From 0899048329e3629ee5467fa4c5540386a35a471c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 20 May 2022 14:30:56 +0200 Subject: [PATCH] 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. --- .../install/files/lib/system/request/RequestHandler.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') -- 2.20.1