Skip to content

Commit 689c933

Browse files
authored
Merge pull request #7930 from pjsde/fix-routing
Fix: Routing::loadRoutes() in windows do not validate correctly $routesFiles
2 parents 642cf3b + dcd8634 commit 689c933

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

system/Router/RouteCollection.php

Lines changed: 4 additions & 0 deletions
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)