mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-58220 repo: Dont expect file info for any file
Some plugins do not implement the file info callback so expect and handle null in this case.
This commit is contained in:
parent
1d43165a5a
commit
aa89bf2e6c
2 changed files with 2 additions and 2 deletions
|
@ -588,7 +588,7 @@ class repository_googledocs extends repository {
|
||||||
$storedfile->get_filepath(),
|
$storedfile->get_filepath(),
|
||||||
$storedfile->get_filename());
|
$storedfile->get_filename());
|
||||||
|
|
||||||
if (empty($options['offline']) && $info->is_writable()) {
|
if (empty($options['offline']) && !empty($info) && $info->is_writable()) {
|
||||||
// Add the current user as an OAuth writer.
|
// Add the current user as an OAuth writer.
|
||||||
$systemauth = \core\oauth2\api::get_system_oauth_client($this->issuer);
|
$systemauth = \core\oauth2\api::get_system_oauth_client($this->issuer);
|
||||||
|
|
||||||
|
|
|
@ -537,7 +537,7 @@ class repository_onedrive extends repository {
|
||||||
$storedfile->get_filepath(),
|
$storedfile->get_filepath(),
|
||||||
$storedfile->get_filename());
|
$storedfile->get_filename());
|
||||||
|
|
||||||
if (empty($options['offline']) && $info->is_writable()) {
|
if (empty($options['offline']) && !empty($info) && $info->is_writable()) {
|
||||||
// Add the current user as an OAuth writer.
|
// Add the current user as an OAuth writer.
|
||||||
$systemauth = \core\oauth2\api::get_system_oauth_client($this->issuer);
|
$systemauth = \core\oauth2\api::get_system_oauth_client($this->issuer);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue