From 1b8a838a7bca4fab7d33f3aea63f824be55800e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sun, 24 Sep 2023 17:29:32 +0200 Subject: [PATCH] replace $_SERVER with request API --- src/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.php b/src/App.php index 903afcce91..82520ce107 100644 --- a/src/App.php +++ b/src/App.php @@ -299,7 +299,7 @@ public function caughtException(\Throwable $exception): void // remove header $this->layout->template->tryDel('Header'); - if (($this->isJsUrlRequest() || ($_SERVER['HTTP_X_REQUESTED_WITH'] ?? '') === 'XMLHttpRequest') + if (($this->isJsUrlRequest() || $this->request->getHeaderLine('X-Requested-With') === 'XMLHttpRequest') && !isset($_GET['__atk_tab'])) { $this->outputResponseJson([ 'success' => false,