From 9d8e9d27bd87167d8d4005942a6af62bfe4c0892 Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 5 Jun 2025 18:11:31 +0200 Subject: [PATCH] Ignore duplicated route exception --- system/router.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/router.php b/system/router.php index 1102ef0e..20f3f07a 100644 --- a/system/router.php +++ b/system/router.php @@ -174,7 +174,12 @@ $dispatcher = FastRoute\cachedDispatcher(function (FastRoute\RouteCollector $r) // apply aliases $route[1] = str_replace($aliases[0], $aliases[1], $route[1]); - $r->addRoute($route[0], $route[1], $route[2]); + try { + $r->addRoute($route[0], $route[1], $route[2]); + } + catch (\Exception $e) { + // duplicated route, just ignore + } } if (config('env') === 'dev') {