diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 67f5409..0450c87 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -623,7 +623,7 @@ class HttpClient if (is_array($body)) { return $body; } - $type = $data['content-type']; + $type = $data['content-type'] ?? 'text/html'; if (strpos($type, 'text/html') !== false) { return $body; } else if (strpos($type, 'json') !== false) {