From c76af658784d3cc947732696b0c6d88a57897947 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Tue, 14 Jul 2020 23:02:10 +0100 Subject: [PATCH] Use RFC3986 for building URI query strings --- lib/Github/Api/AbstractApi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } /**