BUG Undefined var

Getting the curl error.
This commit is contained in:
Daniel Hensby 2013-02-19 12:07:22 +00:00
parent 8d32ae954b
commit 1cf2259b2c

View File

@ -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