Skip to content

Commit

Permalink
Merge pull request #7930 from pjsde/fix-routing
Browse files Browse the repository at this point in the history
Fix: Routing::loadRoutes() in windows do not validate correctly $routesFiles
  • Loading branch information
kenjis authored Sep 15, 2023
2 parents 642cf3b + dcd8634 commit 689c933
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/Router/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ public function loadRoutes(string $routesFile = APPPATH . 'Config/Routes.php')
return $this;
}

// Normalize the path string in routesFile
$realpath = realpath($routesFile);
$routesFile = ($realpath === false) ? $routesFile : $realpath;

// Include the passed in routesFile if it doesn't exist.
// Only keeping that around for BC purposes for now.
$routeFiles = $this->routeFiles;
Expand Down

0 comments on commit 689c933

Please sign in to comment.