From 4aafa55c023f19043e261d16e8f0bc8075cbfe28 Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Tue, 19 Nov 2024 05:32:09 -0500 Subject: [PATCH] set method to null if missing in $_SERVER fixes #18 --- src/Models/Partials/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/Partials/Request.php b/src/Models/Partials/Request.php index 385b624..25f312d 100644 --- a/src/Models/Partials/Request.php +++ b/src/Models/Partials/Request.php @@ -13,7 +13,7 @@ class Request extends Arrayable */ public function __construct() { - $this->method = $_SERVER['REQUEST_METHOD']; + $this->method = $_SERVER['REQUEST_METHOD']??null; $this->version = isset($_SERVER['SERVER_PROTOCOL']) ? \substr($_SERVER['SERVER_PROTOCOL'], \strpos($_SERVER['SERVER_PROTOCOL'], '/'))