Welcome Guest, Not a member yet? Register   Sign In
Routing Issue: Optional ID and Named Routes in CodeIgniter 4
#5

(This post was last modified: 03-27-2025, 01:19 PM by Elias.)

Yeah! I found it! It seems like a bug. There is a conflict of custom names and URI paths.
I have URI "edit" and named URI "edit/(:num)" as "edit". So, name "edit" and the path "edit" intersects.
These names and paths are keys of array of all routes so keys must be unique but its don't!

File: system/Router/Router.php
Method: checkRoutes
https://github.com/codeigniter4/CodeIgni...r.php#L407


I've created a pull request to try and fix this
https://github.com/codeigniter4/CodeIgniter4/pull/9499
Reply


Messages In This Thread
RE: Routing Issue: Optional ID and Named Routes in CodeIgniter 4 - by Elias - 03-27-2025, 11:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB