mirror of
https://github.com/moodle/moodle.git
synced 2025-02-15 21:36:58 +01:00
fixed problem with applying of default settings during install - choices can not be constructed yet
This commit is contained in:
parent
dd04ab499e
commit
441470ff03
@ -634,7 +634,8 @@ class admin_setting_configselect extends admin_setting {
|
||||
|
||||
function write_setting($data) {
|
||||
// check that what we got was in the original choices
|
||||
if (! in_array($data, array_keys($this->choices))) {
|
||||
// or that the data is the default setting - needed during install when choices can not be constructed yet
|
||||
if ($data != $this->defaultsetting and ! in_array($data, array_keys($this->choices))) {
|
||||
return 'Error setting ' . $this->visiblename . '<br />';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user