diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-11-10 20:36:13 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-11-10 20:36:13 +0000 |
commit | 76226df8672409b23856b8ade20d1d884d934af8 (patch) | |
tree | 5078f7c0579fe573695fbaca948a85cd7989b4ae /modules/search.module | |
parent | c19a04e6f896500af1ce8c6cf35bbb134a4ee680 (diff) | |
download | brdo-76226df8672409b23856b8ade20d1d884d934af8.tar.gz brdo-76226df8672409b23856b8ade20d1d884d934af8.tar.bz2 |
#36242: Array merge problems with module_invoke
Diffstat (limited to 'modules/search.module')
-rw-r--r-- | modules/search.module | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/search.module b/modules/search.module index c31c03450..f8e57e408 100644 --- a/modules/search.module +++ b/modules/search.module @@ -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); } |