Skip to content

Commit d508197

Browse files
committed
Merge branch '2.x'
* 2.x: bug KnpLabs#908 [2.x] Use RFC3986 for building URI query strings (GrahamCampbell)
2 parents 92a83ce + 307d74e commit d508197

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Github/Api/AbstractApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function get($path, array $parameters = [], array $requestHeaders = []
103103
}
104104

105105
if (count($parameters) > 0) {
106-
$path .= '?'.http_build_query($parameters);
106+
$path .= '?'.http_build_query($parameters, '', '&', PHP_QUERY_RFC3986);
107107
}
108108

109109
$response = $this->client->getHttpClient()->get($path, $requestHeaders);
@@ -126,7 +126,7 @@ protected function head($path, array $parameters = [], array $requestHeaders = [
126126
unset($parameters['ref']);
127127
}
128128

129-
return $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters), $requestHeaders);
129+
return $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters, '', '&', PHP_QUERY_RFC3986), $requestHeaders);
130130
}
131131

132132
/**

0 commit comments

Comments
 (0)