diff --git a/Voter/UriPrefixVoter.php b/Voter/UriPrefixVoter.php index eaa4bd1d..27a80424 100644 --- a/Voter/UriPrefixVoter.php +++ b/Voter/UriPrefixVoter.php @@ -54,7 +54,7 @@ public function matchItem(ItemInterface $item) if ($content instanceof Route && $content->hasOption('currentUriPrefix')) { $currentUriPrefix = $content->getOption('currentUriPrefix'); - $currentUriPrefix = str_replace('{_locale_}', $this->request->getLocale(), $currentUriPrefix); + $currentUriPrefix = str_replace('{_locale}', $this->request->getLocale(), $currentUriPrefix); if (0 === strncmp($this->request->getPathinfo(), $currentUriPrefix, strlen($currentUriPrefix))) { return true; }