mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG: Fetch curl_error in RestfulService
$curlError was used only once and never defined. Replace $curlError with a call to curl_error($ch).
This commit is contained in:
parent
8a70019e78
commit
d3b3ab806d
@ -299,7 +299,7 @@ class RestfulService extends ViewableData {
|
||||
//get the status code
|
||||
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
//normalise the status code
|
||||
if($curlError !== '' || $statusCode == 0) $statusCode = 500;
|
||||
if(curl_error($ch) !== '' || $statusCode == 0) $statusCode = 500;
|
||||
//calculate the length of the header and extract it
|
||||
$headerLength = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$rawHeaders = substr($rawResponse, 0, $headerLength);
|
||||
|
Loading…
Reference in New Issue
Block a user