- 
 Couldn't load subscription status. 
- Fork 312
Open
@testt23 
Description
Hi everybody,
I found one bug in Router.php
The problem comes when I try to create the maximum length of the string I get. Then the curly brace is exchanged with the ordinary one.
So, If u input new data in index.php like;
$router->add('{lang:[a-z]{2}+}/{controller}/{action}');
$router->add('{lang:[a-z]{2}+}/{controller}/{action}/{id:\d+}');
You take this array:
Core\Router Object
(
 [routes:protected] => Array
 (
 [/^$/i] => Array
 (
 [controller] => Home
 [action] => index
 )
 [/^(?P<lang>[a-z]{2)+}\/(?P<controller>[a-z-]+)\/(?P<action>[a-z-]+)$/i] => Array
 (
 )
 [/^(?P<lang>[a-z]{2)+}\/(?P<controller>[a-z-]+)\/(?P<action>[a-z-]+)\/(?P<id>\d+)$/i] => Array
 (
 )
 [/^admin\/(?P<controller>[a-z-]+)\/(?P<action>[a-z-]+)$/i] => Array
 (
 [namespace] => Admin
 )
 )
 [params:protected] => Array
 (
 )
)
This is wrong:
[/^(?P<lang>[a-z]{2)+}\/(?P<controller>[a-z-]+)\/(?P<action>[a-z-]+)$/i] => Array
{2)+}
this is correct:
[/^(?P<lang>[a-z]{2}+)\/(?P<controller>[a-z-]+)\/(?P<action>[a-z-]+)$/i] => Array
{2}+)
The problem comes when I try to create the maximum length of the string I get. Then the curly brace is exchanged with the ordinary one.
Metadata
Metadata
Assignees
Labels
No labels