diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index 97f85400cdee..d1731b32c270 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -264,6 +264,11 @@ public function __construct(FileLocator $locator, Modules $moduleConfig, Routing $this->autoRoute = $routing->autoRoute; $this->routeFiles = $routing->routeFiles; $this->prioritize = $routing->prioritize; + + // Normalize the path string in routeFiles array. + foreach ($this->routeFiles as $routeKey => $routesFile) { + $this->routeFiles[$routeKey] = realpath($routesFile) ?: $routesFile; + } } /**