Skip to content

Commit

Permalink
Fix incorrect exact match for RouteBase
Browse files Browse the repository at this point in the history
  • Loading branch information
nox7 committed Jun 21, 2021
1 parent bbbed01 commit f6ee958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function getBaselessRouteForClass(\ReflectionClass $classReflection): str
// Is the route a regular expression?
if ($routeBaseAttribute->isRegex === false){
// No, it is a plain string match
if ($routeBaseAttribute->uri === $this->requestPath){
if (str_starts_with($this->requestPath, $routeBaseAttribute->uri)){
return substr($this->requestPath, strlen($routeBaseAttribute->uri));
}
}else{
Expand Down

0 comments on commit f6ee958

Please sign in to comment.