mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Allow Director::$rules like //$Action
In 3.0, doing $Action => SomeController would redirect all action requests to that default controller. In 3.1, you need to do //$Action => SomeController but it didnt work - those initial slashes broke matching
This commit is contained in:
parent
8f6451612b
commit
0ae3050e9e
@ -449,6 +449,9 @@ class SS_HTTPRequest implements ArrayAccess {
|
||||
$shiftCount = sizeof($patternParts);
|
||||
}
|
||||
|
||||
// Filter out any "empty" matching parts - either from an initial / or a trailing /
|
||||
$patternParts = array_values(array_filter($patternParts));
|
||||
|
||||
$arguments = array();
|
||||
foreach($patternParts as $i => $part) {
|
||||
$part = trim($part);
|
||||
|
Loading…
Reference in New Issue
Block a user