mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-29 07:59:31 +02:00
BUG Undefined var
Getting the curl error.
This commit is contained in:
parent
8d32ae954b
commit
1cf2259b2c
|
@ -298,6 +298,8 @@ class RestfulService extends ViewableData {
|
|||
protected function extractResponse($ch, $rawResponse) {
|
||||
//get the status code
|
||||
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
//get a curl error if there is one
|
||||
$curlError = curl_error($ch);
|
||||
//normalise the status code
|
||||
if($curlError !== '' || $statusCode == 0) $statusCode = 500;
|
||||
//calculate the length of the header and extract it
|
||||
|
|
Loading…
Reference in New Issue
Block a user