X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Frouting%2FMatcher%2FDumper%2FPhpMatcherDumper.php;fp=vendor%2Fsymfony%2Frouting%2FMatcher%2FDumper%2FPhpMatcherDumper.php;h=c04605c3f7fef2731a89bb3393752d26a46fe74f;hp=aa7df8a78b5bae403137fe1fce5cd72dfb495773;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php index aa7df8a78..c04605c3f 100644 --- a/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php @@ -223,8 +223,9 @@ EOF; } $supportsTrailingSlash = $supportsRedirections && (!$methods || in_array('HEAD', $methods)); + $regex = $compiledRoute->getRegex(); - if (!count($compiledRoute->getPathVariables()) && false !== preg_match('#^(.)\^(?P.*?)\$\1#', $compiledRoute->getRegex(), $m)) { + if (!count($compiledRoute->getPathVariables()) && false !== preg_match('#^(.)\^(?P.*?)\$\1#'.(substr($regex, -1) === 'u' ? 'u' : ''), $regex, $m)) { if ($supportsTrailingSlash && substr($m['url'], -1) === '/') { $conditions[] = sprintf("rtrim(\$pathinfo, '/') === %s", var_export(rtrim(str_replace('\\', '', $m['url']), '/'), true)); $hasTrailingSlash = true; @@ -236,7 +237,6 @@ EOF; $conditions[] = sprintf('0 === strpos($pathinfo, %s)', var_export($compiledRoute->getStaticPrefix(), true)); } - $regex = $compiledRoute->getRegex(); if ($supportsTrailingSlash && $pos = strpos($regex, '/$')) { $regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2); $hasTrailingSlash = true;