From: Tim Düsterhus Date: Fri, 13 Aug 2021 07:59:35 +0000 (+0200) Subject: Use PSR-7 responses in PollAction X-Git-Tag: 5.5.0_Alpha_1~489 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2f37e5b400b80ecd8342d11f6d9e54e8f2e6c51e;p=GitHub%2FWoltLab%2FWCF.git Use PSR-7 responses in PollAction --- 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); } /**