mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
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…
x
Reference in New Issue
Block a user