mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-18948 fixed handling of indexes when removing options; merged from MOODLE_19_STABLE
This commit is contained in:
parent
db523de37d
commit
29712788b7
@ -92,6 +92,8 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{
|
||||
foreach ($this->_options as $key=>$option){
|
||||
if ($option['attr']['value']==$value){
|
||||
unset($this->_options[$key]);
|
||||
// we must reindex the options because the ugly code in quickforms' select.php expects that keys are 0,1,2,3... !?!?
|
||||
$this->_options = array_merge($this->_options);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user