From ee2a911c94c58633eb5297c41c9f09dc404eb512 Mon Sep 17 00:00:00 2001 From: ping-yee <611077101@mail.nknu.edu.tw> Date: Tue, 9 May 2023 18:30:50 +0800 Subject: [PATCH] fix: fix the path string. --- system/Router/RouteCollection.php | 5 +++++ 1 file changed, 5 insertions(+) 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; + } } /**