[UTIL][EXCEPTION] Forward given status code in RedirectException

This commit is contained in:
Hugo Sales 2022-03-04 15:15:04 +00:00
parent 7a8d67f1e2
commit 7814697f82
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -46,7 +46,7 @@ class RedirectException extends Exception
throw new ServerException(_m('Can not redirect to outside the website from here'), 5400); // 500 Internal server error (likely a bug)
}
}
$this->redirect_response = new RedirectResponse($url);
$this->redirect_response = new RedirectResponse($url, $code);
}
parent::__construct($message, $code, $previous_exception);
}