From d3b3ab806d883fa627264dd1b2daa3321ee27894 Mon Sep 17 00:00:00 2001 From: Fred Condo Date: Fri, 22 Feb 2013 17:41:55 -0800 Subject: [PATCH] BUG: Fetch curl_error in RestfulService $curlError was used only once and never defined. Replace $curlError with a call to curl_error($ch). --- api/RestfulService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/RestfulService.php b/api/RestfulService.php index c789d4c84..224f6e880 100644 --- a/api/RestfulService.php +++ b/api/RestfulService.php @@ -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);