Explorar o código

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

Fabien Potencier %!s(int64=13) %!d(string=hai) anos
pai
achega
e2945c9f9b

+ 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;