From fc7d53d78601990e141e8fe88dc20460a92456f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 20 May 2022 14:36:06 +0200 Subject: [PATCH] Remove dead branch in RequestHandler::redirect() The `redirect()` method is only called in a single location where `$controller` will also be set to a string. --- .../files/lib/system/request/RequestHandler.class.php | 8 ++------ 1 file changed, 2 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 2ee37d02b3..109f982465 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -241,15 +241,11 @@ final class RequestHandler extends SingletonFactory * Redirects to the actual URL, e.g. controller has been aliased or mistyped (boardlist instead of board-list). * * @param string[] $routeData - * @param string $application - * @param string $controller */ - protected function redirect(array $routeData, $application, $controller = null) + protected function redirect(array $routeData, string $application, string $controller) { $routeData['application'] = $application; - if ($controller !== null) { - $routeData['controller'] = $controller; - } + $routeData['controller'] = $controller; // append the remaining query parameters foreach ($_GET as $key => $value) { -- 2.20.1