Skip to content

Commit

Permalink
Merge pull request #2031 from MGatner/router-default-method
Browse files Browse the repository at this point in the history
Fallback to server request for default method
  • Loading branch information
lonnieezell authored May 30, 2019
2 parents cb3616f + 1262701 commit 57f613e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']));
}

//--------------------------------------------------------------------
Expand Down

0 comments on commit 57f613e

Please sign in to comment.