Skip to content

Commit

Permalink
SearchControls: clone UrlParams instance for setEditorUrl()
Browse files Browse the repository at this point in the history
- Otherwise for example calling `$searchbar->getEditorUrl()->setParam('foo')` to manupulate params in *Any*Controller
  will affect the params of $redurectUrl
  • Loading branch information
sukhwinder33445 authored and nilmerg committed Nov 21, 2024
1 parent a116f18 commit e880e10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compat/SearchControls.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function createSearchBar(Query $query, ...$params): SearchBar
if (method_exists($this, 'searchEditorAction')) {
$searchBar->setEditorUrl(Url::fromPath(
"$moduleName/$controllerName/search-editor"
)->setParams($redirectUrl->getParams()));
)->setParams(clone $redirectUrl->getParams()));
}

$filterColumns = $this->fetchFilterColumns($query);
Expand Down

0 comments on commit e880e10

Please sign in to comment.