Cake 1.2.0.6311-beta

The 'day' param in the following route is always passed as the same
value as :month, regardless of the :day value in the URL.

Router::connect('/events/:year/:month/:day',
        array('controller' => 'events', 'action' => 'view', 'day' => null),
        array(
                'year' => '[12][0-9]{3}',
                'month' => '(0[1-9]|1[012])',
                'day' => '(0[1-9]|[12][0-9]|3[01])'
        )
);

The first line in ViewsController::view() is:

debug($this->params);

produces:

Array
(
    [pass] => Array
        (
            [0] => 13
            [1] => 13
        )

    [named] => Array
        (
        )

    [year] => 2008
    [month] => 02
    [day] => 02
    [plugin] =>
    [controller] => events
    [action] => view
    [form] => Array
        (
        )

    [url] => Array
        (
            [url] => events/2008/02/13/
        )

    [bare] => 0
    [webservices] =>
)

If I remove 'day' => null I see this error:

The action 2008 is not defined in controller EventsController

Can anyone spot the problem?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to