From fe62d79a83e4e407d017212c89ee9aa2da41ef98 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 10 Aug 2021 14:44:21 +0200 Subject: [PATCH] Use PSR-7 responses in NotificationDisableAction --- .../NotificationDisableAction.class.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/wcfsetup/install/files/lib/action/NotificationDisableAction.class.php b/wcfsetup/install/files/lib/action/NotificationDisableAction.class.php index 25440d930b..eac7fbe1e3 100644 --- a/wcfsetup/install/files/lib/action/NotificationDisableAction.class.php +++ b/wcfsetup/install/files/lib/action/NotificationDisableAction.class.php @@ -2,9 +2,9 @@ namespace wcf\action; +use Laminas\Diactoros\Response\RedirectResponse; use wcf\form\NotificationUnsubscribeForm; use wcf\system\request\LinkHandler; -use wcf\util\HeaderUtil; use wcf\util\StringUtil; /** @@ -53,12 +53,15 @@ class NotificationDisableAction extends AbstractAction $this->token = StringUtil::trim($_REQUEST['token']); } - HeaderUtil::redirect(LinkHandler::getInstance()->getControllerLink(NotificationUnsubscribeForm::class, [ - 'userID' => $this->userID, - 'eventID' => $this->eventID, - 'token' => $this->token, - ])); - - exit; + return new RedirectResponse( + LinkHandler::getInstance()->getControllerLink( + NotificationUnsubscribeForm::class, + [ + 'userID' => $this->userID, + 'eventID' => $this->eventID, + 'token' => $this->token, + ] + ) + ); } } -- 2.20.1