Skip to content

Commit be1086c

Browse files
committed
Fix for edge case when no params used in GET call
1 parent e6229c0 commit be1086c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Github/HttpClient/HttpClient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ public function getPagination()
127127
*/
128128
public function get($path, array $parameters = array(), array $options = array())
129129
{
130-
$path .= (false === strpos($path, '?') ? '?' : '&').http_build_query($parameters, '', '&');
130+
if (0 < count($parameters)) {
131+
$path .= (false === strpos($path, '?') ? '?' : '&').http_build_query($parameters, '', '&');
132+
}
131133

132134
return $this->request($path, array(), 'GET', $options);
133135
}

0 commit comments

Comments
 (0)