Commit 76226df8 authored by Steven Wittens's avatar Steven Wittens

#36242: Array merge problems with module_invoke

parent c19a04e6
......@@ -563,7 +563,10 @@ function filter_admin_configure() {
$list = filter_list_format($format);
$form = array();
foreach ($list as $filter) {
$form = array_merge($form, module_invoke($filter->module, 'filter', 'settings', $filter->delta, $format));
$form_module = module_invoke($filter->module, 'filter', 'settings', $filter->delta, $format);
if (is_array($form_module)) {
$form = array_merge($form, $form_module);
}
}
if (!empty($form)) {
......
......@@ -563,7 +563,10 @@ function filter_admin_configure() {
$list = filter_list_format($format);
$form = array();
foreach ($list as $filter) {
$form = array_merge($form, module_invoke($filter->module, 'filter', 'settings', $filter->delta, $format));
$form_module = module_invoke($filter->module, 'filter', 'settings', $filter->delta, $format);
if (is_array($form_module)) {
$form = array_merge($form, $form_module);
}
}
if (!empty($form)) {
......
......@@ -931,7 +931,10 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) {
$form['basic']['inline']['keys'] = array('#type' => 'textfield', '#title' => '', '#default_value' => $keys, '#size' => $prompt ? 40 : 30, '#maxlength' => 255);
$form['basic']['inline']['submit'] = array('#type' => 'submit', '#value' => t('Search'));
$form = array_merge($form, module_invoke($type, 'search', 'form', $keys));
$form_module = module_invoke($type, 'search', 'form', $keys);
if (is_array($form_module)) {
$form = array_merge($form, $form_module);
}
return drupal_get_form('search_form', $form);
}
......
......@@ -931,7 +931,10 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) {
$form['basic']['inline']['keys'] = array('#type' => 'textfield', '#title' => '', '#default_value' => $keys, '#size' => $prompt ? 40 : 30, '#maxlength' => 255);
$form['basic']['inline']['submit'] = array('#type' => 'submit', '#value' => t('Search'));
$form = array_merge($form, module_invoke($type, 'search', 'form', $keys));
$form_module = module_invoke($type, 'search', 'form', $keys);
if (is_array($form_module)) {
$form = array_merge($form, $form_module);
}
return drupal_get_form('search_form', $form);
}
......
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