From aa8b93799b6d6d389aa187976a7d27ebf58dbc24 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 16 Mar 2020 19:37:00 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 48a9961..db0755a 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -465,10 +465,12 @@ class HttpClient } echo $url . PHP_EOL; if ($this->method != self::GET) { - var_dump($this->_data, $data); if (!empty($this->_data)) { curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data); } else { + if (is_array($data)) { + $data = http_build_query($data); + } curl_setopt($ch, CURLOPT_POSTFIELDS, $data); } }