Fix for search block default value

  1. function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id) {
  2.   if ($form_id == 'search_block_form') {
  3.     $item = menu_get_item();
  4.     if ($item['map'][0] == 'search') {
  5.       $form['search_block_form']['#default_value'] = $item['map'][2];
  6.     }
  7.   }
  8. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.