diff --git a/lib/form/filepicker.php b/lib/form/filepicker.php index 31a5329..dad4c6b 100644 --- a/lib/form/filepicker.php +++ b/lib/form/filepicker.php @@ -121,7 +121,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input { } // make sure max one file is present and it is not too big - if (!is_null($draftitemid)) { + if (!is_null($draftitemid) && $draftitemid !== '') { $fs = get_file_storage(); $usercontext = get_context_instance(CONTEXT_USER, $USER->id); if ($files = $fs->get_area_files($usercontext->id, 'user', 'draft', $draftitemid, 'id DESC', false)) {