From 0b0f80c1350856d11bf134d750a8ab935e773822 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 15 Jan 2021 19:26:01 +0800 Subject: [PATCH] fix: access_token be an Array --- disk/Aliyundrive.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/disk/Aliyundrive.php b/disk/Aliyundrive.php index e491bed..665df7e 100644 --- a/disk/Aliyundrive.php +++ b/disk/Aliyundrive.php @@ -8,7 +8,7 @@ class Aliyundrive { $this->disktag = $tag; $this->auth_url = 'https://websv.aliyundrive.com/token/refresh'; $this->api_url = 'https://api.aliyundrive.com/v2'; - $this->access_token = $this->get_access_token(getConfig('refresh_token', $tag)); + $res = $this->get_access_token(getConfig('refresh_token', $tag)); $this->default_drive_id = getConfig('default_drive_id', $tag); } @@ -710,6 +710,6 @@ class Aliyundrive { savecache('access_token', $this->access_token, $this->disktag, $ret['expires_in'] - 300); if (time()>getConfig('token_expires', $this->disktag)) setConfig([ 'refresh_token' => $ret['refresh_token'], 'token_expires' => time()+7*24*60*60 ], $this->disktag); } - return $this->access_token; + return true; } -} \ No newline at end of file +}