Skip to content

Commit 8f8fc8f

Browse files
author
Ian Barber
committed
Fix for tests when no cURL available
1 parent 6e75fbb commit 8f8fc8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/general/IoTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,11 @@ public function authCache($io, $client)
213213

214214
public function responseChecker($io)
215215
{
216-
$curlVer = curl_version();
217-
$hasQuirk = $curlVer['version_number'] < Google_IO_Curl::NO_QUIRK_VERSION;
216+
$hasQuirk = false;
217+
if (function_exists('curl_version')) {
218+
$curlVer = curl_version();
219+
$hasQuirk = $curlVer['version_number'] < Google_IO_Curl::NO_QUIRK_VERSION;
220+
}
218221

219222
$rawHeaders = "HTTP/1.1 200 OK\r\n"
220223
. "Expires: Sun, 22 Jan 2012 09:00:56 GMT\r\n"

0 commit comments

Comments
 (0)