Skip to content

Commit 3242cf5

Browse files
committed
Merge pull request #16 from matejskubic/AUTH_URL_TOKEN_bugfix
Authentication with AUTH_URL_TOKEN bug fix
2 parents 265a427 + b38d803 commit 3242cf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Github/HttpClient/Listener/AuthListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function preSend(RequestInterface $request)
8686
}
8787

8888
$url = $request->getUrl();
89-
$url .= '?'.utf8_encode(http_build_query(array('access_token' => $this->options['tokenOrLogin']), '', '&'));
89+
$url .= (false === strpos($url, '?') ? '?' : '&').utf8_encode(http_build_query(array('access_token' => $this->options['tokenOrLogin']), '', '&'));
9090

9191
$request->fromUrl(new Url($url));
9292
break;

0 commit comments

Comments
 (0)