Permalink
Browse files

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
  • Loading branch information...
1 parent 8f64516 commit 0ae3050e9e1217d3b0e04c6213d643661783b403 Hamish Friedlander committed Apr 29, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 control/HTTPRequest.php
View
@@ -449,6 +449,9 @@ public function match($pattern, $shiftOnSuccess = false) {
$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);

0 comments on commit 0ae3050

Please sign in to comment.