Skip to content

Commit 7247297

Browse files
Unset old route params when setting route path
1 parent 16e457d commit 7247297

File tree

1 file changed

+3
-1
lines changed
  • lib/internal/Magento/Framework

1 file changed

+3
-1
lines changed

lib/internal/Magento/Framework/Url.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,16 +528,18 @@ protected function _setRoutePath($data)
528528
}
529529
$this->_setActionName($action);
530530

531+
$routePathParams = [];
531532
if (!empty($routePieces)) {
532533
while (!empty($routePieces)) {
533534
$key = array_shift($routePieces);
534535
if (!empty($routePieces)) {
535536
$value = array_shift($routePieces);
536-
$this->getRouteParamsResolver()->setRouteParam($key, $value);
537+
$routePathParams[$key] = $value;
537538
}
538539
}
539540
}
540541

542+
$this->getRouteParamsResolver()->setRouteParams($routePathParams);
541543
return $this;
542544
}
543545

0 commit comments

Comments
 (0)