From 435bae2f083b4d3dbefb5fb81d19836b35bf12bc Mon Sep 17 00:00:00 2001 From: thefosk Date: Thu, 15 Nov 2012 19:09:22 -0800 Subject: [PATCH] bugfix --- main/mashape/http/HttpUtils.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/mashape/http/HttpUtils.php b/main/mashape/http/HttpUtils.php index d016fcc..c7ecbcc 100644 --- a/main/mashape/http/HttpUtils.php +++ b/main/mashape/http/HttpUtils.php @@ -39,7 +39,9 @@ class HttpUtils { if ($parameters[$key] === null) { unset($parameters[$key]); } else { - $parameters[$key] = (string)$parameters[$key]; + if ($key != HttpUtils::JSON_PARAM_BODY) { + $parameters[$key] = (string)$parameters[$key]; + } } } } @@ -56,7 +58,7 @@ class HttpUtils { break; case ContentType::JSON: $headers[] = "Content-Type: application/json"; - $data = json_encode($parameters[JSON_PARAM_BODY]); + $data = json_encode($parameters[HttpUtils::JSON_PARAM_BODY]); break; default: throw new MashapeClientException(