Skip to content

Commit

Permalink
Merge branch 'fix-wrong-redirect' into '1.x'
Browse files Browse the repository at this point in the history
fix: IPET-417 check if parameter is empty

See merge request magesuite/seo-link-masking!31
  • Loading branch information
Leone committed Oct 20, 2021
2 parents 36a2f4b + a642d65 commit 817bcd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function match(\Magento\Framework\App\RequestInterface $request)
return null;
}

$requestedUrl = ltrim($request->getPathInfo(), '/');
$requestedUrl = trim($request->getPathInfo(), '/');
$rewrite = $this->urlRewriteFinder->findRewrite($requestedUrl);

if (empty($rewrite)) {
Expand Down
4 changes: 4 additions & 0 deletions Model/FilterParametersProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public function toUrl($filterParameters){

protected function prepareParameter($parameter, $options)
{
if (empty($parameter)) {
return null;
}

if (strpos($parameter, $this->configuration->getMultiselectOptionSeparator()) === false) {
if (!isset($options[$parameter])) {
if($this->configuration->isUtfFriendlyModeEnabled()) {
Expand Down

0 comments on commit 817bcd5

Please sign in to comment.