From dcd8634993f07bee19c644980b5cc49d1be0736b Mon Sep 17 00:00:00 2001 From: Paulo Esteves Date: Thu, 14 Sep 2023 09:53:28 +0100 Subject: [PATCH] Fix: Routing::loadRoutes() in windows do not validate correctly $routesFiles --- system/Router/RouteCollection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index 4a052699196c..34629920cc1c 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -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;