From 2f37e5b400b80ecd8342d11f6d9e54e8f2e6c51e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 13 Aug 2021 09:59:35 +0200 Subject: [PATCH] Use PSR-7 responses in PollAction --- wcfsetup/install/files/lib/action/PollAction.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/action/PollAction.class.php b/wcfsetup/install/files/lib/action/PollAction.class.php index 5cce6a8b27..a809e03963 100644 --- a/wcfsetup/install/files/lib/action/PollAction.class.php +++ b/wcfsetup/install/files/lib/action/PollAction.class.php @@ -2,6 +2,7 @@ namespace wcf\action; +use Laminas\Diactoros\Response\JsonResponse; use wcf\system\exception\IllegalLinkException; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\SystemException; @@ -152,11 +153,7 @@ class PollAction extends AJAXProxyAction $this->executed(); - // send JSON-encoded response - \header('Content-type: application/json; charset=UTF-8'); - echo JSON::encode($returnValues); - - exit; + return new JsonResponse($returnValues); } /** -- 2.20.1