Commit 58db2b27 authored by drumm's avatar drumm
Browse files

#62829 by Jaza, Multi selects in hook_settings are broken

parent a3b82160
......@@ -344,11 +344,16 @@ function form_builder($form_id, $form) {
$form['#value'] = !empty($edit) ? $form['#return_value'] : 0;
break;
case 'select':
if (isset($edit)) {
$form['#value'] = $edit;
if (isset($form['#multiple']) && $form['#multiple']) {
if (isset($edit) && is_array($edit)) {
$form['#value'] = drupal_map_assoc($edit);
}
else {
$form['#value'] = array();
}
}
elseif (isset($form['#multiple']) && $form['#multiple']) {
$form['#value'] = array();
elseif (isset($edit)) {
$form['#value'] = $edit;
}
break;
case 'textfield':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment