mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +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) {
|
protected function extractResponse($ch, $rawResponse) {
|
||||||
//get the status code
|
//get the status code
|
||||||
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
|
//get a curl error if there is one
|
||||||
|
$curlError = curl_error($ch);
|
||||||
//normalise the status code
|
//normalise the status code
|
||||||
if($curlError !== '' || $statusCode == 0) $statusCode = 500;
|
if($curlError !== '' || $statusCode == 0) $statusCode = 500;
|
||||||
//calculate the length of the header and extract it
|
//calculate the length of the header and extract it
|
||||||
|
Loading…
Reference in New Issue
Block a user