From 164e339870c1a1b9abdcf8af244f1c033e41b0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez?= Date: Mon, 28 Aug 2023 10:15:42 +0200 Subject: [PATCH] arry key access --- app/public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/public/index.php b/app/public/index.php index 23a1f0f..abd5cfc 100644 --- a/app/public/index.php +++ b/app/public/index.php @@ -27,7 +27,7 @@ $buttons = [ $str = $result = $_GET['str'] ?? ''; $action = $_GET['action'] ?? ''; -$plain = str_contains($_SERVER['HTTP_ACCEPT'], 'text/plain'); +$plain = str_contains($_SERVER['HTTP_ACCEPT'] ?? '', 'text/plain'); $help = 'https://www.php.net/manual/'; $jsonEncodeOptions = JSON_PRETTY_PRINT | JSON_PRESERVE_ZERO_FRACTION | JSON_UNESCAPED_SLASHES;