From 6fc876f59d18913aaaa870900f76419407bc6eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 3 Apr 2020 17:27:30 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {