diff --git a/lib/Github/Api/AbstractApi.php b/lib/Github/Api/AbstractApi.php index 9435d8cd530..666ccf1e4d5 100644 --- a/lib/Github/Api/AbstractApi.php +++ b/lib/Github/Api/AbstractApi.php @@ -103,7 +103,7 @@ protected function get($path, array $parameters = [], array $requestHeaders = [] } if (count($parameters) > 0) { - $path .= '?'.http_build_query($parameters); + $path .= '?'.http_build_query($parameters, '', '&', PHP_QUERY_RFC3986); } $response = $this->client->getHttpClient()->get($path, $requestHeaders); @@ -126,7 +126,7 @@ protected function head($path, array $parameters = [], array $requestHeaders = [ unset($parameters['ref']); } - return $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters), $requestHeaders); + return $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters, '', '&', PHP_QUERY_RFC3986), $requestHeaders); } /**