diff --git a/filter/filter_form.php b/filter/filter_form.php index ebd86aaf..38152dab 100644 --- a/filter/filter_form.php +++ b/filter/filter_form.php @@ -181,6 +181,10 @@ public function custom_search_definition($customsearch, $fields, $fieldoptions, $operatoroptions); $mform->setDefault('searchoperator' . $count, $operator); // Field search elements. + // For select options $value is an arry, we have to convert it to string, function param only accepts strings. + if (is_array($value)) { + $value = json_encode($value); + } list($elems, $separators) = $fields[$fieldid]->renderer()->render_search_mode( $mform, $count, $value);