Skip to content
Permalink
Browse files

MDL-55215 forms: Searchable selector was reindexing keys

  • Loading branch information...
damyon committed Nov 7, 2016
1 parent ab7c5d1 commit 9f592c243c326c7882c7bb446b8998e24c6b0c50
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/form/searchableselector.php
@@ -48,7 +48,8 @@ class MoodleQuickForm_searchableselector extends MoodleQuickForm_autocomplete {
* @param array $attributes List of HTML attributes for the select
*/
public function __construct($elementname = null, $elementlabel = null, $options = [], $attributes = []) {
$options = array_merge(['' => get_string('noselection', 'form')], $options);
unset($options['']);
$options = ['' => get_string('noselection', 'form')] + $options;
parent::__construct($elementname, $elementlabel, $options, $attributes);
}

0 comments on commit 9f592c2

Please sign in to comment.
You can’t perform that action at this time.