mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Merge branch 'wip-MDL-45280-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
1e902feb66
@ -8472,7 +8472,10 @@ class admin_setting_configstoredfile extends admin_setting {
|
||||
|
||||
// Let's not deal with validation here, this is for admins only.
|
||||
$current = $this->get_setting();
|
||||
if (!is_number($data)) {
|
||||
if (empty($data) && $current === null) {
|
||||
// This will be the case when applying default settings (installation).
|
||||
return ($this->config_write($this->name, '') ? '' : get_string('errorsetting', 'admin'));
|
||||
} else if (!is_number($data)) {
|
||||
// Draft item id is expected here!
|
||||
return get_string('errorsetting', 'admin');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user