mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
"MDL-21102, fixed fatal php error in file picker"
This commit is contained in:
parent
75b1018cd3
commit
6926df754e
2 changed files with 3 additions and 2 deletions
|
@ -237,7 +237,7 @@ EOD;
|
|||
$info['file'] = $fileinfo['title'];
|
||||
$info['id'] = $itemid;
|
||||
$info['url'] = $CFG->httpswwwroot.'/draftfile.php/'.$fileinfo['contextid'].'/user_draft/'.$itemid.'/'.$fileinfo['title'];
|
||||
$filesize = $fileinfo->get_filesize();
|
||||
$filesize = $fileinfo['filesize'];
|
||||
if (($maxbytes!==-1) && ($filesize > $maxbytes)) {
|
||||
$fileinfo->delete();
|
||||
throw new file_exception('maxbytes');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue