mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[VD:OneDrive,Box] fix PHP notice errors
This commit is contained in:
@@ -235,7 +235,7 @@ class elFinderVolumeBox extends elFinderVolumeDriver
|
||||
protected function _bd_refreshToken($token)
|
||||
{
|
||||
if ($token->expires < time()) {
|
||||
if (!isset($token->data->refresh_token) || $token->data->refresh_token === null) {
|
||||
if (empty($token->data->refresh_token)) {
|
||||
$this->session->remove('BoxTokens');
|
||||
throw new \Exception(elFinder::ERROR_REAUTH_REQUIRE);
|
||||
}
|
||||
@@ -1664,8 +1664,8 @@ class elFinderVolumeBox extends elFinderVolumeDriver
|
||||
.'?access_token='.urlencode($this->token->data->access_token);
|
||||
}
|
||||
|
||||
$cfile = new CURLFile($tmpFilePath, $mimeType);
|
||||
$mimeType = self::mimetypeInternalDetect($name);
|
||||
$cfile = new CURLFile($tmpFilePath, $mimeType);
|
||||
$params = array('attributes' => json_encode($properties), 'file' => $cfile);
|
||||
$curl = $this->_bd_prepareCurl();
|
||||
$options = array(
|
||||
|
||||
@@ -199,7 +199,7 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver
|
||||
protected function _od_refreshToken($token)
|
||||
{
|
||||
if ($token->expires < time()) {
|
||||
if (null === $this->token->data->refresh_token) {
|
||||
if (empty($this->token->data->refresh_token)) {
|
||||
$this->session->remove('OneDriveTokens');
|
||||
throw new \Exception(elFinder::ERROR_REAUTH_REQUIRE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user