瀏覽代碼

[Routing] fixed Apache matcher dumper (broken by previous merge)

Fabien Potencier 13 年之前
父節點
當前提交
e2945c9f9b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php

+ 1 - 1
src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php

@@ -47,7 +47,7 @@ class ApacheMatcherDumper extends MatcherDumper
             $compiledRoute = $route->compile();
 
             // prepare the apache regex
-            $regex = preg_replace('/\?P<.+?>/', '', substr(str_replace(array("\n", ' '), '', $compiledRoute->getRegex()), 1, -2));
+            $regex = preg_replace('/\?P<.+?>/', '', substr(str_replace(array("\n", ' '), '', $compiledRoute->getRegex()), 1, -3));
             $regex = '^'.preg_quote($options['base_uri']).substr($regex, 1);
 
             $hasTrailingSlash = '/$' == substr($regex, -2) && '^/$' != $regex;