Use PSR-7 responses in NotificationDisableAction
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 10 Aug 2021 12:44:21 +0000 (14:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 11 Aug 2021 14:29:54 +0000 (16:29 +0200)
wcfsetup/install/files/lib/action/NotificationDisableAction.class.php

index 25440d930b6ae02e599266319474d33b6e23322a..eac7fbe1e3fdeabad90bdd9dfc1639969c4a3d3e 100644 (file)
@@ -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,
+                ]
+            )
+        );
     }
 }