From b26545a49b92ede6a3124dd207cfe29ab85667a3 Mon Sep 17 00:00:00 2001 From: huoxiaoqiang Date: Thu, 22 Apr 2021 10:07:57 +0800 Subject: [PATCH] fix: httpRequest exception Too few arguments to function GTClient::auth(), 0 passed in vendor/getuilaboratory/getui-pushapi-php-client-v2/GTBaseApi.php on line 37 and exactly 2 expected --- GTBaseApi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GTBaseApi.php b/GTBaseApi.php index 0f64008..1408eba 100644 --- a/GTBaseApi.php +++ b/GTBaseApi.php @@ -34,7 +34,7 @@ private function httpRequest($api, $params, $method, $gzip = false) if ($rep != null) { if ('10001' == $rep['code']) { try { - if ($this->gtClient->auth()) { + if ($this->gtClient->getAuthToken()) { $rep = GTHttpManager::httpRequest($this->getUrl($api), $params, $this->buildHead(), $gzip, $method); } } catch (GTException $e) { @@ -73,4 +73,4 @@ private function getUrl($api) { return $this->gtClient->getHost() . "/v2/" . $this->gtClient->getAppId() . $api; } -} \ No newline at end of file +}