From eb93584d85fff9ad26452665237e3a41e9be3454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Sat, 14 Nov 2015 22:21:11 +0100 Subject: [PATCH] [BUGFIX] Fixed routeMatch in RouterEntry not matching routes with multiple arguments. --- src/Pecee/SimpleRouter/RouterRoute.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pecee/SimpleRouter/RouterRoute.php b/src/Pecee/SimpleRouter/RouterRoute.php index b4e44d3..c946e22 100644 --- a/src/Pecee/SimpleRouter/RouterRoute.php +++ b/src/Pecee/SimpleRouter/RouterRoute.php @@ -44,7 +44,7 @@ class RouterRoute extends RouterEntry { $route = $this->url; - $routeMatch = preg_replace('/'.self::PARAMETERS_REGEX_MATCH.'/is', '', $route); + $routeMatch = preg_replace('/\/{0,1}'.self::PARAMETERS_REGEX_MATCH.'\/{0,1}/is', '', $route); // Check if url parameter count matches if(stripos($url, $routeMatch) === 0) {