Skip to content

Commit 9ed5acd

Browse files
authored
Merge pull request #73 from simondotws/simondotws-patch-2
Fix for deprecated function in http_build_query
2 parents 2cce766 + 2fa3e46 commit 9ed5acd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OAuth2/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ private function generateMACSignature($url, $parameters, $http_method)
373373
}
374374
if ($http_method == self::HTTP_METHOD_GET) {
375375
if (is_array($parameters)) {
376-
$parsed_url['path'] .= '?' . http_build_query($parameters, null, '&');
376+
$parsed_url['path'] .= '?' . http_build_query($parameters, '', '&');
377377
} elseif ($parameters) {
378378
$parsed_url['path'] .= '?' . $parameters;
379379
}
@@ -422,7 +422,7 @@ private function executeRequest($url, $parameters = array(), $http_method = self
422422
* http://php.net/manual/en/function.curl-setopt.php
423423
*/
424424
if(is_array($parameters) && self::HTTP_FORM_CONTENT_TYPE_APPLICATION === $form_content_type) {
425-
$parameters = http_build_query($parameters, null, '&');
425+
$parameters = http_build_query($parameters, '', '&');
426426
}
427427
$curl_options[CURLOPT_POSTFIELDS] = $parameters;
428428
break;
@@ -432,7 +432,7 @@ private function executeRequest($url, $parameters = array(), $http_method = self
432432
case self::HTTP_METHOD_DELETE:
433433
case self::HTTP_METHOD_GET:
434434
if (is_array($parameters) && count($parameters) > 0) {
435-
$url .= '?' . http_build_query($parameters, null, '&');
435+
$url .= '?' . http_build_query($parameters, '', '&');
436436
} elseif ($parameters) {
437437
$url .= '?' . $parameters;
438438
}

0 commit comments

Comments
 (0)