Created
August 19, 2015 07:48
-
-
Save justjkk/aacd1d0cf236f6c903f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Router/DefaultPatternGenerationStrategy.php b/Router/DefaultPatternGenerationStrategy.php | |
index 2fe5dfb..714ea37 100755 | |
--- a/Router/DefaultPatternGenerationStrategy.php | |
+++ b/Router/DefaultPatternGenerationStrategy.php | |
@@ -66,6 +66,9 @@ class DefaultPatternGenerationStrategy implements PatternGenerationStrategyInter | |
// prefix with locale if requested | |
if (self::STRATEGY_PREFIX === $this->strategy | |
|| (self::STRATEGY_PREFIX_EXCEPT_DEFAULT === $this->strategy && $this->defaultLocale !== $locale)) { | |
+ if ($i18nPattern == '/') { | |
+ $i18nPattern = ''; | |
+ } | |
$i18nPattern = '/'.$locale.$i18nPattern; | |
if (null !== $route->getOption('i18n_prefix')) { | |
$i18nPattern = $route->getOption('i18n_prefix').$i18nPattern; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment