Merge branch 'MDL-63231-set-default-value-for-int-param-MOODLE_Master' of https://github.com/guillalva06/moodle

This commit is contained in:
Jun Pataleta 2018-09-12 10:00:01 +08:00
commit d784584243

View file

@ -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']);