#8 ✓resolved
Leonard Chin

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

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.

New-ticket Create new ticket

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


Referenced by