Merge branch 'MDL-87438-main' of https://github.com/muhammadarnaldo/moodle
This commit is contained in:
@@ -3707,12 +3707,15 @@ class admin_setting_configmultiselect extends admin_setting_configselect {
|
||||
if (!is_array($data)) {
|
||||
return ''; //ignore it
|
||||
}
|
||||
if (!$this->load_choices() or empty($this->choices)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
unset($data['xxxxx']);
|
||||
|
||||
// Only reject when the caller actually supplied a value
|
||||
// and there is no valid choices to validate against.
|
||||
if (!empty($data) && (!$this->load_choices() || empty($this->choices))) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$save = array();
|
||||
foreach ($data as $value) {
|
||||
if (!array_key_exists($value, $this->choices)) {
|
||||
|
||||
Reference in New Issue
Block a user