view->url(): Clone $path if it's already of type Icinga\Web\Url
Avoids side effects in case of url params adjustments. fixes #9351
This commit is contained in:
parent
f2c7d5686a
commit
eba862a290
|
@ -20,7 +20,12 @@ $this->addHelperFunction('url', function ($path = null, $params = null) {
|
|||
} else {
|
||||
$url = Url::fromPath($path);
|
||||
}
|
||||
|
||||
if ($params !== null) {
|
||||
if ($url === $path) {
|
||||
$url = clone $url;
|
||||
}
|
||||
|
||||
$url->overwriteParams($params);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue