Skip to content

Commit

Permalink
Fix: Routing::loadRoutes() in windows do not validate correctly $rout…
Browse files Browse the repository at this point in the history
…esFiles
  • Loading branch information
pjsde committed Sep 14, 2023
1 parent 875384f commit 193e14d
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 193e14d

Please sign in to comment.