Skip to content

Commit e880e10

Browse files
sukhwinder33445nilmerg
authored andcommitted
SearchControls: clone UrlParams instance for setEditorUrl()
- Otherwise for example calling `$searchbar->getEditorUrl()->setParam('foo')` to manupulate params in *Any*Controller will affect the params of $redurectUrl
1 parent a116f18 commit e880e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Compat/SearchControls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function createSearchBar(Query $query, ...$params): SearchBar
9393
if (method_exists($this, 'searchEditorAction')) {
9494
$searchBar->setEditorUrl(Url::fromPath(
9595
"$moduleName/$controllerName/search-editor"
96-
)->setParams($redirectUrl->getParams()));
96+
)->setParams(clone $redirectUrl->getParams()));
9797
}
9898

9999
$filterColumns = $this->fetchFilterColumns($query);

0 commit comments

Comments
 (0)