regexp routes fail if captures are unnamed
Reported by Leonard Chin | June 9th, 2009 @ 11:07 AM | in Release 0.3 - Citronnade
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
Comments and changes to this ticket
-
Fabrice Luraine June 9th, 2009 @ 02:40 PM
- State changed from new to resolved
(from [166f93c254906720afcb21418fe89c0bc637f9ea]) Fixing regexp routes that fail if captures are unnamed. [#8 state:resolved] Update matching test case.
http://github.com/sofadesign/limonade/commit/166f93c254906720afcb21... -
Fabrice Luraine June 10th, 2009 @ 09:08 AM
- Milestone set to Release 0.3 - Citronnade
[milestone:ID#42088 bulk edit command]
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Limonade is a PHP micro-framework.
People watching this ticket
Tags
Referenced by
- 8 regexp routes fail if captures are unnamed (from [166f93c254906720afcb21418fe89c0bc637f9ea]) Fixing ...