Skip to content

Commit dcd8634

Browse files
committed
Fix: Routing::loadRoutes() in windows do not validate correctly $routesFiles
1 parent e420c03 commit dcd8634

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

system/Router/RouteCollection.php

+4
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ public function loadRoutes(string $routesFile = APPPATH . 'Config/Routes.php')
319319
return $this;
320320
}
321321

322+
// Normalize the path string in routesFile
323+
$realpath = realpath($routesFile);
324+
$routesFile = ($realpath === false) ? $routesFile : $realpath;
325+
322326
// Include the passed in routesFile if it doesn't exist.
323327
// Only keeping that around for BC purposes for now.
324328
$routeFiles = $this->routeFiles;

0 commit comments

Comments
 (0)