From 1cf2259b2c3dd3bf026d0ef8683abfc243dd54d0 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 19 Feb 2013 12:07:22 +0000 Subject: [PATCH] BUG Undefined var Getting the curl error. --- api/RestfulService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/RestfulService.php b/api/RestfulService.php index 3cd44431e..fde9898f3 100644 --- a/api/RestfulService.php +++ b/api/RestfulService.php @@ -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