Skip to content

Commit

Permalink
Merge pull request #9 from getmanenko/master
Browse files Browse the repository at this point in the history
Updated filter values for url (not removed 0)
  • Loading branch information
vitalyiegorov committed May 17, 2016
2 parents 877b208 + 289538d commit b7fe165
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ public function init(array $params = array())
SamsonLocale::$leaveDefaultLocale = $this->browserLocaleRedirect;

// This should be change to receive path as a parameter on initialization
$pathParts = array_values(array_filter(explode(Route::DELIMITER, $_SERVER['REQUEST_URI'])));
$pathParts = array_values(array_filter(explode(Route::DELIMITER, $_SERVER['REQUEST_URI']), function($v){
return ($v !== '' && null !== $v);
}));

// Parse URL and store locale found bug
$localeFound = SamsonLocale::parseURL($pathParts, $this->browserLocaleRedirect);
// Gather URL path parts with removed locale placeholder
Expand Down

0 comments on commit b7fe165

Please sign in to comment.