Fixing a bug which was preventing payloads to serialize into JSON

This commit is contained in:
who 2015-04-15 16:17:21 -07:00
parent f4a2eff4b7
commit 164a01ed12

View File

@ -94,7 +94,7 @@ class APIClient {
$headers[] = $this->headerName . ": " . $this->headerValue;
}
if ((isset($headers['Content-Type']) and strpos($headers['Content-Type'], "multipart/form-data") === FALSE) and (is_object($postData) or is_array($postData))) {
if ((isset($headerName['Content-Type']) and strpos($headerName['Content-Type'], "multipart/form-data") === FALSE) and (is_object($postData) or is_array($postData))) {
$postData = json_encode($this->sanitizeForSerialization($postData));
}