Skip to content

Commit

Permalink
Return the new route request - don't just exit
Browse files Browse the repository at this point in the history
  • Loading branch information
nox7 committed Apr 21, 2022
1 parent f747894 commit c97c5b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@ public function routeCurrentRequest(): mixed{
// There is a new request path
// Rewrite this request
$this->requestPath = $attributeResponse->newRequestPath;
$this->routeCurrentRequest();
exit();
return $this->routeCurrentRequest();
}else{
// A response code was set, but no new request path.
// Just return a blank string in this case.
Expand Down Expand Up @@ -497,8 +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->routeCurrentRequest();
exit();
return $this->routeCurrentRequest();
}
}else{
// Just skip this route
Expand Down

0 comments on commit c97c5b2

Please sign in to comment.