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

index 8fcd897bb4e47e82aa8dfddd45a0f810a97927cb..16a4b02f58a3395d2ca469abf013d4e771f6d059 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace wcf\action;
 
+use Laminas\Diactoros\Response\RedirectResponse;
 use wcf\data\object\type\ObjectTypeCache;
 use wcf\data\user\notification\event\UserNotificationEvent;
 use wcf\data\user\notification\UserNotification;
@@ -12,7 +13,6 @@ use wcf\system\exception\PermissionDeniedException;
 use wcf\system\user\notification\event\IUserNotificationEvent;
 use wcf\system\user\notification\UserNotificationHandler;
 use wcf\system\WCF;
-use wcf\util\HeaderUtil;
 
 /**
  * Marks target notification as confirmed and forwards to the notification URL.
@@ -98,8 +98,8 @@ class NotificationConfirmAction extends AbstractAction
             $this->notification->additionalData
         );
 
-        HeaderUtil::redirect($notificationEvent->getLink());
-
-        exit;
+        return new RedirectResponse(
+            $notificationEvent->getLink()
+        );
     }
 }