Skip to content

Commit

Permalink
Merge pull request #19 from tacman/patch-1
Browse files Browse the repository at this point in the history
set method to null if missing in $_SERVER
  • Loading branch information
ilvalerione authored Nov 21, 2024
2 parents 1ac9003 + 4aafa55 commit a492f18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Partials/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'], '/'))
Expand Down

0 comments on commit a492f18

Please sign in to comment.