Skip to content

Commit c2e2d3b

Browse files
authored
Merge pull request #582 from skipperbent/v4-group-prefix-bug
Fixed issue causing group prefix to trigger on paths without "/" (issue #573 - thanks @Venloress)
2 parents 471bbe1 + 5dd0690 commit c2e2d3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Pecee/SimpleRouter/Route/RouteGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function matchRoute(string $url, Request $request): bool
7878
}
7979

8080
/* Skip if prefix doesn't match */
81-
if ($this->prefix !== null && stripos($url, $parsedPrefix) === false) {
81+
if ($this->prefix !== null && stripos($url, rtrim($parsedPrefix, '/') . '/') === false) {
8282
return false;
8383
}
8484

0 commit comments

Comments
 (0)