From 395f667ecad8d93f3e48a4fd57ceffc21dcd365c Mon Sep 17 00:00:00 2001 From: Ibrahim BinAlshikh Date: Thu, 12 Dec 2024 18:19:01 +0300 Subject: [PATCH] Update RouterUri.php --- webfiori/framework/router/RouterUri.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webfiori/framework/router/RouterUri.php b/webfiori/framework/router/RouterUri.php index f1577bf5..01e6471b 100644 --- a/webfiori/framework/router/RouterUri.php +++ b/webfiori/framework/router/RouterUri.php @@ -267,7 +267,7 @@ public function getLanguages() : array { public function getMiddleware() : array { if (count($this->assignedMiddlewareList) != count($this->sortedMiddleeareList)) { $compareFunc = function ($a, $b) { - return $b->getPriority() - $a->getPriority(); + return $a->compare($b); }; $this->sortedMiddleeareList = $this->assignedMiddlewareList;