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

This commit is contained in:
Fabien Potencier 2011-09-23 20:56:36 +02:00
parent d830253876
commit e2945c9f9b

View File

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