How to get search to display an error when no search terms are entered
The form submission callback for the search form is the following function.

function search_form_submit($form, &amp;$form_state) {
  $keys = $form_state['values']['processed_keys'];
  if ($keys == '') {
    form_set_error('keys', t('Please enter some keywords.'));
    // Fall through to the drupal_goto() call.
  }

  $type = $form_state['values']['module'] ? $form_state['values']['module'] : 'node';
  $form_state['redirect'] = 'search/' . $type . '/' . $keys;
  return;
}


If, when you don't enter anything, Drupal searches for search, there must be a module that alter the content of $form_state['values']['processed_keys'] when it is an empty string.