Skip to content

Commit

Permalink
Fix locale matcher.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 29, 2013
1 parent 4249f77 commit 91a632f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Illuminate/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ public function handleUriLocales(array $locales)

foreach ($locales as $locale)
{
if (starts_with($path, '/'.$locale)) return $this->removeLocaleFromUri($locale);
if (preg_match("#^\/{$locale}(?:$|/)#i", $path))
{
return $this->removeLocaleFromUri($locale);
}
}
}

Expand Down

0 comments on commit 91a632f

Please sign in to comment.