From 8d32ae954b244a6b7e575f85c6f371b440ffd719 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Mon, 18 Feb 2013 11:55:11 +0000 Subject: [PATCH 1/2] BUG setBody on SS_HTTPRequest is a function When settingt he cached body on the RESTfulService_Response, the setBody should be a function call, not a variable assignment --- api/RestfulService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/RestfulService.php b/api/RestfulService.php index c789d4c84..3cd44431e 100644 --- a/api/RestfulService.php +++ b/api/RestfulService.php @@ -588,7 +588,7 @@ class RestfulService_Response extends SS_HTTPResponse { $this->cachedResponse = new RestfulService_Response($content); } else { - $this->cachedResponse->setBody = $content; + $this->cachedResponse->setBody($content); } } From 1cf2259b2c3dd3bf026d0ef8683abfc243dd54d0 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Tue, 19 Feb 2013 12:07:22 +0000 Subject: [PATCH 2/2] 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