Skip to content

Commit 7f54c59

Browse files
committed
Fix PHP 5.2 compatibility - closes KnpLabs#10
1 parent ac2575f commit 7f54c59

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎lib/Github/Client.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ class Github_Client
5252
*/
5353
public function __construct(Github_HttpClientInterface $httpClient = null)
5454
{
55-
$this->httpClient = $httpClient ?: new Github_HttpClient_Curl();
55+
if (null === $httpClient) {
56+
$this->httpClient = new Github_HttpClientInterface();
57+
} else {
58+
$this->httpClient = $httpClient;
59+
}
5660
}
5761

5862
/**

0 commit comments

Comments
 (0)