Merge branch 'MDL-78417-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE

This commit is contained in:
Huong Nguyen
2024-02-08 15:45:35 +08:00
committed by Andrew Nicols
@@ -367,6 +367,11 @@ class cli_helper {
$firstoption = reset($selectoptions);
$default = $firstoption['attr']['value'];
}
// The menu profile field type allows for an empty default value, handle that here.
if (preg_match('/^profile_field_/', $name) && $default === '') {
$possiblevalues[] = $default;
}
}
if ($element instanceof \HTML_QuickForm_checkbox) {