Merge branch 'wip-MDL-45280-m25' of git://github.com/marinaglancy/moodle into MOODLE_25_STABLE

This commit is contained in:
Sam Hemelryk
2014-04-28 12:22:48 +12:00
+4 -1
View File
@@ -8270,7 +8270,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');
}