From f5a32cf520a64e074c356d527a71f214e620b15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Tue, 27 Oct 2015 10:35:57 +0100 Subject: [PATCH] =?UTF-8?q?[BUGFIX]=C2=A0Fixed=20router=20paths.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Pecee/SimpleRouter/RouterBase.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Pecee/SimpleRouter/RouterBase.php b/src/Pecee/SimpleRouter/RouterBase.php index bbaeb1d..a86c9f2 100644 --- a/src/Pecee/SimpleRouter/RouterBase.php +++ b/src/Pecee/SimpleRouter/RouterBase.php @@ -102,7 +102,10 @@ class RouterBase { // Make sure the urls is in the right order when comparing usort($this->controllerUrlMap, function($a, $b) { - return strcmp($a->getUrl(), $b->getUrl()); + if(stripos($b->getUrl(), '{') !== false) { + return $a->getUrl(); + } + return strcmp($b->getUrl(), $a->getUrl()); }); $routeNotAllowed = false;