From 7f6e6777282b3040eb7b1eb4e31fb7cf869f798f Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 2 Dec 2024 14:57:30 +0100 Subject: [PATCH] Url::add_url_parameter(): add support for empty array value --- src/Url.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Url.php b/src/Url.php index c50954a..07aec97 100644 --- a/src/Url.php +++ b/src/Url.php @@ -547,6 +547,8 @@ class Url { if (is_array($value)) { foreach($value as $v) $url = self :: add_url_parameter($url, $parameter."[]", $v); + if (empty($value)) + $url = self :: add_url_parameter($url, $parameter, ""); return $url; } if (strpos($url, '?') === false)