From 9fc7b7f87ed8521e3f3d459d4d0f2cda4c565432 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 10 Aug 2021 15:40:45 +0200 Subject: [PATCH] Use PSR-7 responses in AbstractDialogAction --- .../files/lib/action/AbstractDialogAction.class.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/lib/action/AbstractDialogAction.class.php b/wcfsetup/install/files/lib/action/AbstractDialogAction.class.php index f7e5100514..eb5df893c0 100644 --- a/wcfsetup/install/files/lib/action/AbstractDialogAction.class.php +++ b/wcfsetup/install/files/lib/action/AbstractDialogAction.class.php @@ -2,9 +2,9 @@ namespace wcf\action; +use Laminas\Diactoros\Response\JsonResponse; use wcf\system\exception\AJAXException; use wcf\system\exception\IllegalLinkException; -use wcf\util\JSON; use wcf\util\StringUtil; /** @@ -74,11 +74,7 @@ abstract class AbstractDialogAction extends AbstractSecureAction $this->executed(); - // send JSON-encoded response - \header('Content-type: application/json; charset=UTF-8'); - echo JSON::encode($this->data); - - exit; + return new JsonResponse($this->data); } /** -- 2.20.1