Skip to content

Commit

Permalink
replace $_SERVER with request API
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Sep 24, 2023
1 parent 84ef41d commit 1b8a838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1b8a838

Please sign in to comment.