Skip to content

Commit

Permalink
Fix missing reset request method
Browse files Browse the repository at this point in the history
Rerouted requests wouldn't work this way
  • Loading branch information
nox7 committed Jul 22, 2022
1 parent 3ba514f commit 3d6c694
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ public function routeCurrentRequest(): mixed{
// There is a new request path
// Rewrite this request
$this->requestPath = $attributeResponse->newRequestPath;
$this->requestMethod = "get";
return $this->routeCurrentRequest();
}else{
// A response code was set, but no new request path.
Expand Down Expand Up @@ -495,6 +496,7 @@ public function routeCurrentRequest(): mixed{
// Instantiate a new request handler now and handle it
// A new router must also be created
$this->requestPath = $dynamicRouteResponse->newRequestPath;
$this->requestMethod = "get";
return $this->routeCurrentRequest();
}
}else{
Expand Down

0 comments on commit 3d6c694

Please sign in to comment.