diff --git a/common/HttpClient.php b/common/HttpClient.php index b43d72a..6fc68ff 100644 --- a/common/HttpClient.php +++ b/common/HttpClient.php @@ -469,13 +469,10 @@ class HttpClient } if (strpos($type, 'json') !== false) { return json_decode($body, true); - } else if (strpos($type, 'xml') !== false || strpos($type, 'plain') !== false) { - if (!is_null($newBody = json_decode($body, true))) { - return $newBody; - } + } else if (strpos($type, 'xml') !== false) { return Help::toArray($body); } else if (strpos($type, 'plain') !== false) { - return json_decode($body, TRUE); + return Help::toArray($body); } else { return $body; }