[VD:OneDrive,Box] fix PHP notice errors

This commit is contained in:
nao-pon
2016-11-14 16:33:47 +09:00
parent 625faac16a
commit c6800bd13a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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(
+1 -1
View File
@@ -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);
}