From 5dd06900090405f8c84adb498400f5c74a068c5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Sun, 18 Jul 2021 01:41:26 +0200 Subject: [PATCH] Fixed issue causing group prefix to trigger on paths without "/" (issue #573 - thanks @Venloress). --- src/Pecee/SimpleRouter/Route/RouteGroup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pecee/SimpleRouter/Route/RouteGroup.php b/src/Pecee/SimpleRouter/Route/RouteGroup.php index fbd9a97..71b650b 100644 --- a/src/Pecee/SimpleRouter/Route/RouteGroup.php +++ b/src/Pecee/SimpleRouter/Route/RouteGroup.php @@ -78,7 +78,7 @@ class RouteGroup extends Route implements IGroupRoute } /* Skip if prefix doesn't match */ - if ($this->prefix !== null && stripos($url, $parsedPrefix) === false) { + if ($this->prefix !== null && stripos($url, rtrim($parsedPrefix, '/') . '/') === false) { return false; }