From 12627016c367d724f4fd30df6770683e2423a82a Mon Sep 17 00:00:00 2001 From: MGatner Date: Wed, 29 May 2019 11:53:34 -0400 Subject: [PATCH] Fallback to server request for default method --- system/Router/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Router/Router.php b/system/Router/Router.php index 7dfb14ccb3fa..01e8a940e2c7 100644 --- a/system/Router/Router.php +++ b/system/Router/Router.php @@ -145,7 +145,7 @@ public function __construct(RouteCollectionInterface $routes, Request $request = $this->controller = $this->collection->getDefaultController(); $this->method = $this->collection->getDefaultMethod(); - $this->collection->setHTTPVerb($request->getMethod() ?? 'get'); + $this->collection->setHTTPVerb($request->getMethod() ?? strtolower($_SERVER['REQUEST_METHOD'])); } //--------------------------------------------------------------------