From 1843ea0594acd72495ff039e64b895ba821833d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Tue, 27 Oct 2015 10:29:40 +0100 Subject: [PATCH] [BUGFIX] Fixed routes always matching /show/{id} when other routes are added. --- src/Pecee/SimpleRouter/RouterBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pecee/SimpleRouter/RouterBase.php b/src/Pecee/SimpleRouter/RouterBase.php index f90bb2c..bbaeb1d 100644 --- a/src/Pecee/SimpleRouter/RouterBase.php +++ b/src/Pecee/SimpleRouter/RouterBase.php @@ -102,7 +102,7 @@ class RouterBase { // Make sure the urls is in the right order when comparing usort($this->controllerUrlMap, function($a, $b) { - return strcmp($b->getUrl(), $a->getUrl()); + return strcmp($a->getUrl(), $b->getUrl()); }); $routeNotAllowed = false;