mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-63231 filepicker: Skype validation for null values
In file_get_all_files_in_draftarea function an integer could get a null value so it is necessary to execute this function only when is called with a valid integer value.
This commit is contained in:
parent
6e2e63457e
commit
e0dac0f4d7
@ -320,11 +320,15 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element implements temp
|
||||
/**
|
||||
* Check that all files have the allowed type.
|
||||
*
|
||||
* @param array $value Draft item id with the uploaded files.
|
||||
* @param int $value Draft item id with the uploaded files.
|
||||
* @return string|null Validation error message or null.
|
||||
*/
|
||||
public function validateSubmitValue($value) {
|
||||
|
||||
if (empty($value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$filetypesutil = new \core_form\filetypes_util();
|
||||
$whitelist = $filetypesutil->normalize_file_types($this->_options['accepted_types']);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user