From 508dda6562a43e85597e4839d94b5b6c546d220a Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 1 Mar 2023 10:40:00 +0100 Subject: [PATCH] Url::add_url_parameter() & Url::add_url_parameters(): $url parameter is now not a reference --- src/Url.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Url.php b/src/Url.php index 5f4dbb0..1e3e89f 100644 --- a/src/Url.php +++ b/src/Url.php @@ -531,14 +531,14 @@ class Url { /** * Add parameter in specified URL * - * @param string &$url The reference of the URL + * @param string $url The URL * @param string $parameter The parameter name * @param string $value The parameter value * @param boolean $encode Set if parameter value must be URL encoded (optional, default: true) * * @return string The completed URL */ - public static function add_url_parameter(&$url, $parameter, $value, $encode=true) { + public static function add_url_parameter($url, $parameter, $value, $encode=true) { if (strpos($url, '?') === false) $url .= '?'; else @@ -550,15 +550,15 @@ class Url { /** * Add parameters in specified URL * - * @param string &$url The reference of the URL + * @param string $url The URL * @param array $parameters The parameters as an associative array * @param boolean $encode Set if parameters values must be URL encoded (optional, default: true) * * @return string The completed URL */ - public static function add_url_parameters(&$url, $parameters, $encode=true) { + public static function add_url_parameters($url, $parameters, $encode=true) { foreach($parameters as $parameter => $value) - self :: add_url_parameter($url, $parameter, $value, $encode); + $url = self :: add_url_parameter($url, $parameter, $value, $encode); return $url; }