Skip to content

Commit

Permalink
Fix localeSegment reset. Fixes #3386
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Jul 25, 2020
1 parent 5d9c293 commit f0bc438
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ protected function checkRoutes(string $uri): bool
// Loop through the route array looking for wildcards
foreach ($routes as $key => $val)
{
// Reset localeSegment
$localeSegment = null;

$key = $key === '/'
? $key
: ltrim($key, '/ ');
Expand Down Expand Up @@ -442,7 +445,6 @@ protected function checkRoutes(string $uri): bool
// The following may be inefficient, but doesn't upset NetBeans :-/
$temp = (explode('/', $uri));
$this->detectedLocale = $temp[$localeSegment];
unset($localeSegment);
}

// Are we using Closures? If so, then we need
Expand Down

0 comments on commit f0bc438

Please sign in to comment.