Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

regexp routes fail if captures are unnamed

#8

The following results in an error:

dispatch('^/(\d+)', 'my_func');

Giving the parameters names fixes this problem:

dispatch(array('^/(\d+)', array('num')), 'my_func');

The error occurs inside route_find after a match when trying to build $params. $route['names'] is empty, so the array_combine fails.

Found in version 4d7a09f30a84344314ebbb5ad889c9a75aa1a6cd with PHP v5.2.8

Reported by Leonard Chin · June 9th, 2009 @ 11:07 AM

State: resolved
Assigned to: nobody

Activity

  1. Fabrice Luraine
    Fabrice Luraine
    • State changed from new to resolved

    (from [166f93c254906720afcb21418fe89c0bc637f9ea]) Fixing regexp routes that fail if captures are unnamed. [#8 regexp routes fail if captures are unnamed state:resolved] Update matching test case.
    http://github.com/sofadesign/limonade/commit/166f93c254906720afcb21...

    June 9th, 2009 @ 02:40 PM

  2. Fabrice Luraine
    Fabrice Luraine

    [milestone:none bulk edit command]

    June 10th, 2009 @ 09:08 AM

  3. Fabrice Luraine
    Fabrice Luraine
    • Milestone set to Release 0.3 - Citronnade

    [milestone:ID#42088 bulk edit command]

    June 10th, 2009 @ 09:08 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.