Skip to content

Commit 09b147d

Browse files
committed
Bug Fix
path is empty in some test cases but strpos can't handle an empty needle so added check if path is not empty
1 parent 0cc862b commit 09b147d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Github/HttpClient/HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function put($path, array $parameters = array(), array $headers = array()
163163
*/
164164
public function request($path, array $parameters = array(), $httpMethod = 'GET', array $headers = array())
165165
{
166-
if (0 !== strpos( $path, $this->options['base_url'] )) {
166+
if ( !empty($this->options['base_url']) AND 0 !== strpos( $path, $this->options['base_url'] )) {
167167
$path = trim($this->options['base_url'].$path, '/');
168168
}
169169

0 commit comments

Comments
 (0)