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…
Reference in New Issue