fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Route statement :segment regex not correct #33

Closed WanWizard closed 13 years ago

WanWizard commented 13 years ago

In the Route class, ":segment" is replaced by "([^/]+([^/]*))", which contains a double set of parentheses, giving you $1 and $2.

See http://fuelphp.com/forums/topics/view/1005 for more details.

santiagofs commented 13 years ago

The solution you gave ( replacing $this->search = str_replace(array(':any', ':segment'), array('.+', '[^/]*'), $this->path); on the compile statment) seems to be working fine.

WanWizard commented 13 years ago

Ok, I'm going push this to the develop branch then.