mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Url: Drop unwanted boolean parameters in method onlyWith()
This commit is contained in:
parent
46769b9be2
commit
cb9ccc68f7
@ -845,9 +845,13 @@ class Url
|
|||||||
}
|
}
|
||||||
|
|
||||||
$url = clone $this;
|
$url = clone $this;
|
||||||
foreach ($url->getParams()->toArray(false) as $key => $_) {
|
foreach ($url->getParams()->toArray(false) as $param => $value) {
|
||||||
if (! in_array($key, $keyOrArrayOfKeys, true)) {
|
if (is_int($param)) {
|
||||||
$url->remove($key);
|
$param = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! in_array($param, $keyOrArrayOfKeys, true)) {
|
||||||
|
$url->remove($param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user