Monday, September 29, 2008

Re: This Router test fails when using named parameters.

I've been debugging this code, and I'm confused as to how Routing is
suppose to work with named parameters.

In the Router.php file in the function mapRouteElements there is this
logic.

if (!strpos($route[0], '*') && (!empty($pass) || !empty($named))) {
return false;
}

This will return false from mapRouteElement if the named array is not
empty. So if there are named parameters they are not getting handled,
and after returning to Router::url() it continues to build a simple /
gems/gemsProfiles/show/username:mustan9 URL.

It it be possible that this code is broken?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: