Url::add_url_parameter() & Url::add_url_parameters(): $url parameter is now not a reference
This commit is contained in:
parent
2bf05291fe
commit
508dda6562
1 changed files with 5 additions and 5 deletions
10
src/Url.php
10
src/Url.php
|
@ -531,14 +531,14 @@ class Url {
|
||||||
/**
|
/**
|
||||||
* Add parameter in specified 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 $parameter The parameter name
|
||||||
* @param string $value The parameter value
|
* @param string $value The parameter value
|
||||||
* @param boolean $encode Set if parameter value must be URL encoded (optional, default: true)
|
* @param boolean $encode Set if parameter value must be URL encoded (optional, default: true)
|
||||||
*
|
*
|
||||||
* @return string The completed URL
|
* @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)
|
if (strpos($url, '?') === false)
|
||||||
$url .= '?';
|
$url .= '?';
|
||||||
else
|
else
|
||||||
|
@ -550,15 +550,15 @@ class Url {
|
||||||
/**
|
/**
|
||||||
* Add parameters in specified URL
|
* Add parameters in specified URL
|
||||||
*
|
*
|
||||||
* @param string &$url The reference of the URL
|
* @param string $url The URL
|
||||||
* @param array<string,string> $parameters The parameters as an associative array
|
* @param array<string,string> $parameters The parameters as an associative array
|
||||||
* @param boolean $encode Set if parameters values must be URL encoded (optional, default: true)
|
* @param boolean $encode Set if parameters values must be URL encoded (optional, default: true)
|
||||||
*
|
*
|
||||||
* @return string The completed URL
|
* @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)
|
foreach($parameters as $parameter => $value)
|
||||||
self :: add_url_parameter($url, $parameter, $value, $encode);
|
$url = self :: add_url_parameter($url, $parameter, $value, $encode);
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue