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;
|
||||
foreach ($url->getParams()->toArray(false) as $key => $_) {
|
||||
if (! in_array($key, $keyOrArrayOfKeys, true)) {
|
||||
$url->remove($key);
|
||||
foreach ($url->getParams()->toArray(false) as $param => $value) {
|
||||
if (is_int($param)) {
|
||||
$param = $value;
|
||||
}
|
||||
|
||||
if (! in_array($param, $keyOrArrayOfKeys, true)) {
|
||||
$url->remove($param);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue