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:
Hamish Friedlander 2013-04-29 16:13:37 +12:00
parent 8f6451612b
commit 0ae3050e9e

View File

@ -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);