- Removed optional brackets from routes in UrlExtension.

This commit is contained in:
mcndave committed 2022-12-08 19:10:43 +00:00
1 parent 3de5f46de6
commit 33298ff2e4
2 files changed
+14 -2

No files matched your search

+10
View File
@@ -234,6 +234,16 @@ PATTERN;
$route = str_replace(array_keys($search), array_values($search), $route);
}
/*
* @TODO - must also take into account that recursivity is possible here [/test[/another[/still]]],
* so the regex must be adjusted (or simply using another method could also be a possiblity)
* while(strpos($route, '[') !== false && strpos($route, ']') !== false ) {
if ( preg_match_all('~[(.*?)]~si', $route, $matches, PREG_SET_ORDER) ) {
}
}*/
$route = trim(str_replace([ '[', ']' ], '', $route), '/');
return $route;
}
}