Commit 5e4d1fe
committed
fix: normalize directory separators in route file paths for Windows
Fixes #7474
On Windows, realpath() returns paths with backslashes (e.g.,
D:\path\to\file.php) while routeFiles paths use forward slashes
(App/Config/Routes.php). This caused in_array() comparison to fail
in loadRoutes(), preventing route files from being recognized as
already loaded and causing 404 override tests to fail.
The fix normalizes all realpath() results to use forward slashes,
making path comparisons consistent across platforms.
Ref: #74741 parent 2a1c348 commit 5e4d1fe
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
0 commit comments