From 27ec89e1724e4df87ef6f19d2485b59d433d3ca0 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 15 Jan 2021 19:26:39 +0800 Subject: [PATCH] fix: access_token be an Array --- disk/Onedrive.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disk/Onedrive.php b/disk/Onedrive.php index 229ea3a..807e42e 100644 --- a/disk/Onedrive.php +++ b/disk/Onedrive.php @@ -17,7 +17,7 @@ class Onedrive { $this->oauth_url = 'https://login.microsoftonline.com/common/oauth2/v2.0/'; $this->api_url = 'https://graph.microsoft.com/v1.0'; $this->scope = 'https://graph.microsoft.com/Files.ReadWrite.All offline_access'; - $this->access_token = $this->get_access_token(getConfig('refresh_token', $tag)); + $res = $this->get_access_token(getConfig('refresh_token', $tag)); $this->client_secret = urlencode($this->client_secret); $this->scope = urlencode($this->scope); @@ -732,7 +732,7 @@ class Onedrive { 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; } protected function get_siteid($sharepointSite)