ZF-11769: Params passed in url do not take precedence over default param setting in route


I have the following route setup here:

routes.blah.route = "m/c/*"
routes.blah.defaults.module = m
routes.blah.defaults.controller = c
routes.blah.defaults.action = a
routes.blah.defaults.somevar = 1

My intention is to have "somevar" as an optional parameter, where it is 1 if not specified. Going to the following url:


I can see that "somevar" is 1 as expected.

If I go to:


I can see that "somevar" is still 1 despite me setting it in the url. The route seems fine as I can do:


And "somethingelse" will be 3 as expected. Shouldn't the parameter I passed in the url take precedence over the default param value I set in the route?

My workaround at the moment is just to use a regex route to make the parameter optional but this behavior sure does seem strange.


Closing as not an issue, this is more of s support request.

Please use the mailing lists, or #zftalk on freenode IRC for support.

With regard to why functionally this is not an issue:

The /m/c in your route will not be parameters, but only something which would have to be matched to use that route for the request. if you wish those to be parameters, use the parameternaming to make them parameters. :m/:c/* for example.