RestApiClient: fail without curl

fixes #10929
This commit is contained in:
Thomas Gelf 2016-03-06 21:12:59 +01:00
parent fd757054e7
commit 218e67527b
1 changed files with 7 additions and 1 deletions

View File

@ -60,11 +60,17 @@ class RestApiClient
{
if (function_exists('curl_version')) {
return $this->curlRequest($method, $url, $body, $raw, $stream);
/*
// Completely disabled fallback method, caused too many issues
// with hanging connections on specific PHP versions
} elseif (version_compare(PHP_VERSION, '5.4.0') >= 0) {
// TODO: fail if stream
return $this->phpRequest($method, $url, $body, $raw);
*/
} else {
throw new Exception('No CURL extension detected, this is required for PHP < 5.4');
throw new Exception(
'No CURL extension detected, it must be installed and enabled'
);
}
}