Index: form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.277
diff -u -p -r1.277 form.inc
--- form.inc	18 Jul 2008 07:06:24 -0000	1.277
+++ form.inc	4 Aug 2008 11:59:17 -0000
@@ -851,6 +851,17 @@ function form_builder($form_id, $form, &
     $form += $info;
   }
 
+  // If there is a select element on the page which does not have the default
+  // value set and the element is set to required, the form will default use
+  // the first item in the #options array. This code prevent from this 
+  // situation.
+  if ($form['#type'] == 'select' && $form['#required'] && !$form['#default_value']) {
+    $form['#options'] = array_reverse($form['#options'], TRUE);
+    $form['#options'][''] = t('<select>');
+    $form['#options'] = array_reverse($form['#options'], TRUE);
+    $form['#default_value'] = '';
+  }
+  
   if (isset($form['#type']) && $form['#type'] == 'form') {
     $cache = NULL;
     $complete_form = $form;
