[BUGFIX] Setting content type for pagetype 5000

This commit is contained in:
Philipp Dieter 2020-10-19 22:50:47 +02:00
parent 5e7953acde
commit b7f93518d0

View File

@ -662,10 +662,9 @@ class ActionController extends BaseController
} else { } else {
$this->response->setStatus($this->responseStatus); $this->response->setStatus($this->responseStatus);
} }
$this->response->setHeader( if ($this->pageType == $this->ajaxPageType) {
'Content-type', $GLOBALS['TSFE']->setContentType('application/json');
'application/json' }
);
unset($result['data']); unset($result['data']);
if ($this->redirect) { if ($this->redirect) {
$result['redirect'] = $this->redirect; $result['redirect'] = $this->redirect;