diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index ace369d..ec4546c 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -695,7 +695,6 @@ class HttpClient if (!is_string($data)) { curl_setopt($ch, CURLOPT_POSTFIELDS, $this->mergeParams($data)); } else { - var_dump($data); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); } } @@ -785,7 +784,7 @@ class HttpClient if (is_array($body)) { return $body; } - $type = $data['content-type'] ?? $data['Content-Type'] ?? 'text/html'; + $type = isset($data['content-type']) ? $data['content-type'] : (isset($data['Content-Type']) ? $data['Content-Type'] : 'text/html'); if (strpos($type, 'text/html') !== false) { return $body; } else if (strpos($type, 'json') !== false) {