Skip to content

Commit 3d6f732

Browse files
committed
fix alias
1 parent d3ae3a7 commit 3d6f732

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static function addRouteAlias(string $path, Route $route): void
103103
{
104104
[$alias] = self::preparePath($path);
105105

106-
if (array_key_exists($alias, self::$routes[$route->getMethod()])) {
106+
if (array_key_exists($alias, self::$routes[$route->getMethod()]) && !self::$allowOverride) {
107107
throw new Exception("Route for ({$route->getMethod()}:{$alias}) already registered.");
108108
}
109109

0 commit comments

Comments
 (0)