diff options
| -rw-r--r-- | lib/utils.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.php b/lib/utils.php index 085ed05..81b6bf2 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -1,6 +1,6 @@ <?php include_once $_SERVER['DOCUMENT_ROOT'] . '/../config.php'; -define('IS_JSON_REQUEST', $_SERVER['HTTP_ACCEPT'] == 'application/json'); +define('IS_JSON_REQUEST', isset($_SERVER['HTTP_ACCEPT']) && $_SERVER['HTTP_ACCEPT'] == 'application/json'); function json_response(mixed $data, string|null $message, int $code = 200) { |
