=== modified file 'includes/form.inc'
--- includes/form.inc	2010-09-27 00:53:55 +0000
+++ includes/form.inc	2010-09-30 04:09:25 +0000
@@ -1162,26 +1162,6 @@ function _form_validate(&$elements, &$fo
             }
           }
         }
-        // Non-multiple select fields always have a value in HTML. If the user
-        // does not change the form, it will be the value of the first option.
-        // Because of this, form validation for the field will almost always
-        // pass, even if the user did not select anything. To work around this
-        // browser behavior, select fields without a #default_value get an
-        // additional, first empty option by default. In case the submitted
-        // value is identical to the empty option's value, we reset the
-        // element's value to NULL to trigger the regular #required handling
-        // below.
-        // @see form_process_select()
-        elseif ($elements['#type'] == 'select' && !$elements['#multiple'] && !isset($elements['#default_value']) && $elements['#value'] === (string) $elements['#empty_value']) {
-          if ($elements['#required']) {
-            $elements['#value'] = NULL;
-            form_set_value($elements, NULL, $form_state);
-          }
-          else {
-            $elements['#value'] = $elements['#empty_value'];
-            form_set_value($elements, $elements['#empty_value'], $form_state);
-          }
-        }
         elseif (!isset($options[$elements['#value']])) {
           form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.'));
           watchdog('form', 'Illegal choice %choice in %name element.', array('%choice' => $elements['#value'], '%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR);
@@ -1225,24 +1205,18 @@ function _form_validate(&$elements, &$fo
     // Make sure a value is passed when the field is required.
     if (isset($elements['#needs_validation']) && $elements['#required']) {
       // A simple call to empty() will not cut it here as some fields, like
-      // checkboxes, can return a valid value of '0'. Instead, check the
-      // length if it's a string, and the item count if it's an array.
-      // An unchecked checkbox has a #value of integer 0, different than string
-      // '0', which could be a valid value.
+      // checkboxes, can return a valid value of '0'.
+      // This checks for empty arrays for checkboxes and multiple selects.
       $is_empty_multiple = (!count($elements['#value']));
+      // This checks for empty strings.
       $is_empty_string = (is_string($elements['#value']) && drupal_strlen(trim($elements['#value'])) == 0);
-      $is_empty_value = ($elements['#value'] === 0);
-      if ($is_empty_multiple || $is_empty_string || $is_empty_value) {
-        // Although discouraged, a #title is not mandatory for form elements. In
-        // case there is no #title, we cannot set a form error message.
-        // Instead of setting no #title, form constructors are encouraged to set
-        // #title_display to 'invisible' to improve accessibility.
-        if (isset($elements['#title'])) {
-          form_error($elements, $t('!name field is required.', array('!name' => $elements['#title'])));
-        }
-        else {
-          form_error($elements);
-        }
+      // An unchecked checkbox has a #value of integer 0. This can never be a
+      // submitted value as those are strings.
+      $is_unchecked = ($elements['#value'] === 0);
+      // #required selectboxes using their #empty_value.
+      $is_empty_value = isset($elements['#empty_value']) && $elements['#value'] === $elements['#empty_value'];
+      if ($is_empty_multiple || $is_empty_string || $is_unchecked || $is_empty_value) {
+        form_error($elements, $t('!name field is required.', array('!name' => $elements['#title'])));
       }
     }
 
@@ -2291,92 +2265,18 @@ function _form_options_flatten($array) {
   return $return;
 }
 
-/**
- * Processes a select list form element.
- *
- * This process callback is mandatory for select fields, since all user agents
- * automatically preselect the first available option of single (non-multiple)
- * select lists.
- *
- * @param $element
- *   The form element to process. Properties used:
- *   - #multiple: (optional) Indicates whether one or more options can be
- *     selected. Defaults to FALSE.
- *   - #default_value: Must be NULL or not set in case there is no value for the
- *     element yet, in which case a first default option is inserted by default.
- *     Whether this first option is a valid option depends on whether the field
- *     is #required or not.
- *   - #required: (optional) Whether the user needs to select an option (TRUE)
- *     or not (FALSE). Defaults to TRUE.
- *   - #empty_option: (optional) The label to show for the first default option.
- *     By default, the label is automatically set to "- Please select -" for a
- *     required field and "- None -" for an optional field.
- *   - #empty_value: (optional) The value for the first default option, which is
- *     used to determine whether the user submitted a value or not. Defaults to
- *     '' (an empty string). To be used in case the field is optional and the
- *     empty default value should have a special value (e.g., a constant).
- *
- * @see _form_validate()
- */
 function form_process_select($element) {
   // #multiple select fields need a special #name.
   if ($element['#multiple']) {
     $element['#attributes']['multiple'] = 'multiple';
     $element['#attributes']['name'] = $element['#name'] . '[]';
-    // If not explicitly set, #required has to default to FALSE (see below).
-    if (!isset($element['#required'])) {
-      $element['#required'] = FALSE;
-    }
   }
-  // A non-#multiple select needs special handling to prevent user agents from
-  // preselecting the first option without intention. #multiple select lists do
-  // not get an empty option, as it would not make sense, user interface-wise.
-  else {
-    $add_empty_option = FALSE;
-    // Select elements always have a value in HTML, so the expectation is that
-    // the user has to choose an option. Therefore, a select element is set to
-    // #required TRUE, unless it has been explicitly set to FALSE. This differs
-    // from every other element which gets a default of #required FALSE via
-    // form_builder(). To avoid this default, system_element_info() sets
-    // #required to NULL.
-    // If #required has been explicitly set to FALSE, the user may optionally
-    // choose an option, which can be "None".
-    if (isset($element['#required']) && !$element['#required']) {
-      $element['#required'] = FALSE;
-      $element += array(
-        '#empty_value' => '',
-        '#empty_option' => t('- None -'),
-      );
-      $add_empty_option = TRUE;
-    }
-    // Otherwise, if #required is TRUE (or not set) and there is no
-    // #default_value, then the user has to choose an option, which makes this
-    // element #required.
-    elseif (!isset($element['#default_value'])) {
-      // By only conditionally setting #required to TRUE, we additionally ensure
-      // that the select element does not get a required marker if it already
-      // has a value.
-      $element['#required'] = TRUE;
-      $element += array(
-        '#empty_value' => '',
-        '#empty_option' => t('- Select -'),
-      );
-      $add_empty_option = TRUE;
-    }
-    // If there is a #default_value and #required is not explicitly FALSE, then
-    // there is no point in adding an empty option which is never valid, and we
-    // just retain API compatibility.
-    if (!isset($element['#required'])) {
-      $element['#required'] = FALSE;
-    }
-    // If one of the above conditions is met, add a first empty default option,
-    // which is always invalid for #required select lists that do not specify a
-    // #default_value.
-    // @see _form_validate()
-    if ($add_empty_option) {
-      // The empty option is prepended to #options and purposively not merged
-      // to prevent another option in #options mistakenly using the same value
-      // as #empty_value.
+  elseif (!empty($element['#required']) && !isset($element['#default_value'])) {
+    $element += array(
+      '#empty_value' => '',
+      '#empty_option' => t('- Select -'),
+    );
+    if (!isset($element['#options'][$element['#empty_value']])) {
       $empty_option = array($element['#empty_value'] => $element['#empty_option']);
       $element['#options'] = $empty_option + $element['#options'];
     }

=== modified file 'includes/install.core.inc'
--- includes/install.core.inc	2010-09-24 21:36:22 +0000
+++ includes/install.core.inc	2010-09-30 02:57:17 +0000
@@ -1749,11 +1749,11 @@ function _install_configure_form($form, 
   );
 
   $countries = country_get_list();
+  $countries = array_merge(array('' => st('No default country')), $countries);
   $form['server_settings']['site_default_country'] = array(
     '#type' => 'select',
     '#title' => t('Default country'),
-    '#required' => FALSE,
-    '#default_value' => variable_get('site_default_country', NULL),
+    '#default_value' => variable_get('site_default_country', ''),
     '#options' => $countries,
     '#description' => st('Select the default country for the site.'),
     '#weight' => 0,

=== modified file 'modules/aggregator/aggregator.processor.inc'
--- modules/aggregator/aggregator.processor.inc	2010-09-24 21:36:22 +0000
+++ modules/aggregator/aggregator.processor.inc	2010-09-30 02:57:17 +0000
@@ -70,7 +70,7 @@ function aggregator_aggregator_remove($f
 function aggregator_form_aggregator_admin_form_alter(&$form, $form_state) {
   if (in_array('aggregator', variable_get('aggregator_processors', array('aggregator')))) {
     $info = module_invoke('aggregator', 'aggregator_process', 'info');
-    $items = drupal_map_assoc(array(3, 5, 10, 15, 20, 25), '_aggregator_items');
+    $items = array(0 => t('none')) + drupal_map_assoc(array(3, 5, 10, 15, 20, 25), '_aggregator_items');
     $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
     $period[AGGREGATOR_CLEAR_NEVER] = t('Never');
 
@@ -90,10 +90,8 @@ function aggregator_form_aggregator_admi
 
     $form['modules']['aggregator']['aggregator_summary_items'] = array(
       '#type' => 'select',
-      '#title' => t('Number of items shown in listing pages'),
-      '#required' => FALSE,
+      '#title' => t('Number of items shown in listing pages') ,
       '#default_value' => variable_get('aggregator_summary_items', 3),
-      '#empty_value' => 0,
       '#options' => $items,
     );
 

=== modified file 'modules/block/block.admin.inc'
--- modules/block/block.admin.inc	2010-09-24 21:36:22 +0000
+++ modules/block/block.admin.inc	2010-09-30 02:57:17 +0000
@@ -85,6 +85,9 @@ function block_admin_display_form($form,
     $block_regions = system_region_list($theme, REGIONS_VISIBLE);
   }
 
+  // We always add a region for disabled blocks.
+  $block_regions += array(BLOCK_REGION_NONE => '<' . t('none') . '>');
+
   // Weights range from -delta to +delta, so delta should be at least half
   // of the amount of blocks present. This makes sure all blocks in the same
   // region get an unique weight.
@@ -97,8 +100,7 @@ function block_admin_display_form($form,
   );
   $form['block_regions'] = array(
     '#type' => 'value',
-    // Add a last region for disabled blocks.
-    '#value' => $block_regions + array(BLOCK_REGION_NONE => BLOCK_REGION_NONE),
+    '#value' => $block_regions,
   );
   $form['blocks'] = array();
   $form['#tree'] = TRUE;
@@ -125,15 +127,13 @@ function block_admin_display_form($form,
       '#default_value' => $block['weight'],
       '#delta' => $weight_delta,
       '#title_display' => 'invisible',
-      '#title' => t('Weight for @block block', array('@block' => $block['info'])),
+      '#title' => t('Weight for @block block', array('%block' => $block['info'])),
     );
     $form['blocks'][$key]['region'] = array(
       '#type' => 'select',
-      '#required' => FALSE,
-      '#default_value' => $block['region'] != BLOCK_REGION_NONE ? $block['region'] : NULL,
-      '#empty_value' => BLOCK_REGION_NONE,
+      '#default_value' => $block['region'],
       '#title_display' => 'invisible',
-      '#title' => t('Region for @block block', array('@block' => $block['info'])),
+      '#title' => t('Region for @block block', array('%block' => $block['info'])),
       '#options' => $block_regions,
     );
     $form['blocks'][$key]['configure'] = array(
@@ -150,7 +150,7 @@ function block_admin_display_form($form,
     }
   }
   // Do not allow disabling the main system content block.
-  $form['blocks']['system_main']['region']['#required'] = TRUE;
+  unset($form['blocks']['system_main']['region']['#options'][BLOCK_REGION_NONE]);
 
   $form['actions'] = array(
     '#tree' => FALSE,
@@ -302,10 +302,9 @@ function block_admin_configure($form, &$
       $form['regions'][$key] = array(
         '#type' => 'select',
         '#title' => $theme->info['name'],
-        '#required' => FALSE,
-        '#default_value' => !empty($region) && $region != -1 ? $region : NULL,
-        '#empty_value' => BLOCK_REGION_NONE,
-        '#options' => system_region_list($key, REGIONS_VISIBLE),
+        '#default_value' => (!empty($region) ? $region : BLOCK_REGION_NONE),
+        '#options' => array(BLOCK_REGION_NONE => t('<none>')) + system_region_list($key, REGIONS_VISIBLE),
+        '#expandable' => ($key !== $theme_default),
         '#weight' => ($key == $theme_default ? 9 : 10),
       );
     }
@@ -658,7 +657,7 @@ function template_preprocess_block_admin
     $block = &$variables['form']['blocks'][$i];
 
     // Fetch the region for the current block.
-    $region = (isset($block['region']['#default_value']) ? $block['region']['#default_value'] : BLOCK_REGION_NONE);
+    $region = $block['region']['#default_value'];
 
     // Set special classes needed for table drag and drop.
     $block['region']['#attributes']['class'] = array('block-region-select', 'block-region-' . $region);

=== modified file 'modules/field_ui/field_ui.admin.inc'
--- modules/field_ui/field_ui.admin.inc	2010-09-29 02:01:34 +0000
+++ modules/field_ui/field_ui.admin.inc	2010-09-30 02:57:17 +0000
@@ -304,7 +304,7 @@ function field_ui_field_overview_form($f
       t('Widget'),
       array('data' => t('Operations'), 'colspan' => 2),
     ),
-    '#parent_options' => array(),
+    '#parent_options' => array('' => t('<none>')),
     '#regions' => array(
       'main' => array(),
       'add_new' => array('title' => '&nbsp;'),
@@ -335,7 +335,6 @@ function field_ui_field_overview_form($f
       'parent_wrapper' => array(
         'parent' => array(
           '#type' => 'select',
-          '#required' => FALSE,
           '#options' => $table['#parent_options'],
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
@@ -402,7 +401,6 @@ function field_ui_field_overview_form($f
       'parent_wrapper' => array(
         'parent' => array(
           '#type' => 'select',
-          '#required' => FALSE,
           '#options' => $table['#parent_options'],
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
@@ -434,6 +432,8 @@ function field_ui_field_overview_form($f
   $field_type_options = field_ui_field_type_options();
   $widget_type_options = field_ui_widget_type_options(NULL, TRUE);
   if ($field_type_options && $widget_type_options) {
+    array_unshift($field_type_options, t('- Select a field type -'));
+    array_unshift($widget_type_options, t('- Select a widget -'));
     $name = '_add_new_field';
     $table[$name] = array(
       '#attributes' => array('class' => array('draggable', 'tabledrag-leaf', 'add-new')),
@@ -458,7 +458,6 @@ function field_ui_field_overview_form($f
       'parent_wrapper' => array(
         'parent' => array(
           '#type' => 'select',
-          '#required' => FALSE,
           '#options' => $table['#parent_options'],
           '#attributes' => array('class' => array('field-parent')),
           '#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
@@ -482,18 +481,14 @@ function field_ui_field_overview_form($f
       ),
       'type' => array(
         '#type' => 'select',
-        '#required' => FALSE,
         '#options' => $field_type_options,
-        '#empty_option' => t('- Select a field type -'),
         '#description' => t('Type of data to store.'),
         '#attributes' => array('class' => array('field-type-select')),
         '#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
       ),
       'widget_type' => array(
         '#type' => 'select',
-        '#required' => FALSE,
         '#options' => $widget_type_options,
-        '#empty_option' => t('- Select a widget -'),
         '#description' => t('Form element to edit the data.'),
         '#attributes' => array('class' => array('widget-type-select')),
         '#cell_attributes' => array('colspan' => 3),
@@ -505,6 +500,7 @@ function field_ui_field_overview_form($f
   // Additional row: add existing field.
   $existing_field_options = field_ui_existing_field_options($entity_type, $bundle);
   if ($existing_field_options && $widget_type_options) {
+    array_unshift($existing_field_options, t('- Select an existing field -'));
     $name = '_add_existing_field';
     $table[$name] = array(
       '#attributes' => array('class' => array('draggable', 'tabledrag-leaf', 'add-new')),
@@ -530,7 +526,6 @@ function field_ui_field_overview_form($f
       'parent_wrapper' => array(
         'parent' => array(
           '#type' => 'select',
-          '#required' => FALSE,
           '#options' => $table['#parent_options'],
           '#attributes' => array('class' => array('field-parent')),
           '#prefix' => '<div class="add-new-placeholder">&nbsp;</div>',
@@ -544,9 +539,7 @@ function field_ui_field_overview_form($f
       ),
       'field_name' => array(
         '#type' => 'select',
-        '#required' => FALSE,
         '#options' => $existing_field_options,
-        '#empty_option' => t('- Select an existing field -'),
         '#description' => t('Field to share'),
         '#attributes' => array('class' => array('field-select')),
         '#cell_attributes' => array('colspan' => 2),
@@ -554,9 +547,7 @@ function field_ui_field_overview_form($f
       ),
       'widget_type' => array(
         '#type' => 'select',
-        '#required' => FALSE,
         '#options' => $widget_type_options,
-        '#empty_option' => t('- Select a widget -'),
         '#description' => t('Form element to edit the data.'),
         '#attributes' => array('class' => array('widget-type-select')),
         '#cell_attributes' => array('colspan' => 3),
@@ -853,7 +844,7 @@ function field_ui_display_overview_form(
       'visible' => array('message' => t('No field is displayed.')),
       'hidden' => array('title' => t('Hidden'), 'message' => t('No field is hidden.')),
     ),
-    '#parent_options' => array(),
+    '#parent_options' => array('' => t('<none>')),
     '#attributes' => array(
       'class' => array('field-ui-overview'),
       'id' => 'field-display-overview',
@@ -897,8 +888,8 @@ function field_ui_display_overview_form(
       'parent_wrapper' => array(
         'parent' => array(
           '#type' => 'select',
-          '#required' => FALSE,
           '#options' => $table['#parent_options'],
+          '#default_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
         ),
@@ -1051,8 +1042,8 @@ function field_ui_display_overview_form(
       'parent_wrapper' => array(
         'parent' => array(
           '#type' => 'select',
-          '#required' => FALSE,
           '#options' => $table['#parent_options'],
+          '#default_value' => '',
           '#attributes' => array('class' => array('field-parent')),
           '#parents' => array('fields', $name, 'parent'),
         ),

=== modified file 'modules/filter/filter.module'
--- modules/filter/filter.module	2010-09-29 20:12:51 +0000
+++ modules/filter/filter.module	2010-09-30 03:47:08 +0000
@@ -507,7 +507,7 @@ function filter_default_format($account 
 function filter_fallback_format() {
   // This variable is automatically set in the database for all installations
   // of Drupal. In the event that it gets disabled or deleted somehow, there
-  // is no safe default to return, since we do not want to risk making an 
+  // is no safe default to return, since we do not want to risk making an
   // existing (and potentially unsafe) text format on the site automatically
   // available to all users. Returning NULL at least guarantees that this
   // cannot happen.
@@ -851,6 +851,7 @@ function filter_process_format($element)
   // format.
   if (!$format_exists && $user_is_admin) {
     $element['format']['format']['#default_value'] = NULL;
+    $element['format']['format']['#required'] = TRUE;
     // Force access to the format selector (it may have been denied above if
     // the user only has access to a single format).
     $element['format']['format']['#access'] = TRUE;

=== modified file 'modules/image/image.admin.inc'
--- modules/image/image.admin.inc	2010-09-27 00:53:55 +0000
+++ modules/image/image.admin.inc	2010-09-30 02:57:17 +0000
@@ -116,7 +116,7 @@ function image_style_form($form, &$form_
   }
 
   // Build the new image effect addition form and add it to the effect list.
-  $new_effect_options = array();
+  $new_effect_options = array('' => t('Select a new effect'));
   foreach (image_effect_definitions() as $effect => $definition) {
     $new_effect_options[$effect] = check_plain($definition['label']);
   }
@@ -127,9 +127,7 @@ function image_style_form($form, &$form_
   );
   $form['effects']['new']['new'] = array(
     '#type' => 'select',
-    '#required' => FALSE,
     '#options' => $new_effect_options,
-    '#empty_option' => t('Select a new effect'),
   );
   $form['effects']['new']['weight'] = array(
     '#type' => 'weight',
@@ -292,12 +290,11 @@ function image_style_delete_form($form, 
   $form_state['image_style'] = $style;
 
   $replacement_styles = array_diff_key(image_style_options(), array($style['name'] => ''));
+  $replacement_styles[''] = t('No replacement, just delete');
   $form['replacement'] = array(
     '#title' => t('Replacement style'),
     '#type' => 'select',
-    '#required' => FALSE,
     '#options' => $replacement_styles,
-    '#empty_option' => t('No replacement, just delete'),
   );
 
   return confirm_form(

=== modified file 'modules/image/image.field.inc'
--- modules/image/image.field.inc	2010-09-24 21:36:22 +0000
+++ modules/image/image.field.inc	2010-09-30 02:57:17 +0000
@@ -269,8 +269,7 @@ function image_field_widget_settings_for
   $form['preview_image_style'] = array(
     '#title' => t('Preview image style'),
     '#type' => 'select',
-    '#required' => FALSE,
-    '#options' => image_style_options(FALSE),
+    '#options' => array('' => '<' . t('no preview') . '>') + image_style_options(FALSE),
     '#default_value' => $settings['preview_image_style'],
     '#description' => t('The preview image will be shown while editing the content.'),
     '#weight' => 15,
@@ -419,24 +418,22 @@ function image_field_formatter_settings_
   $display = $instance['display'][$view_mode];
   $settings = $display['settings'];
 
-  $image_styles = image_style_options(FALSE);
+  $image_styles = array('' => t('None (original image)')) + image_style_options(FALSE);
   $form['image_style'] = array(
     '#title' => t('Image style'),
     '#type' => 'select',
-    '#required' => FALSE,
     '#default_value' => $settings['image_style'],
-    '#empty_option' => t('None (original image)'),
     '#options' => $image_styles,
   );
 
   $link_types = array(
+    '' => t('<none>'),
     'content' => t('Content'),
     'file' => t('File'),
   );
   $form['image_link'] = array(
     '#title' => t('Link image to'),
     '#type' => 'select',
-    '#required' => FALSE,
     '#default_value' => $settings['image_link'],
     '#options' => $link_types,
   );

=== modified file 'modules/locale/locale.admin.inc'
--- modules/locale/locale.admin.inc	2010-09-24 21:36:22 +0000
+++ modules/locale/locale.admin.inc	2010-09-30 02:57:17 +0000
@@ -854,9 +854,7 @@ function locale_translation_filter_form(
       $form['filters']['status'][$key] = array(
         '#title' => $filter['title'],
         '#type' => 'select',
-        '#required' => FALSE,
-        '#empty_value' => 'all',
-        '#empty_option' => $filter['options']['all'],
+        '#multiple' => FALSE,
         '#size' => 0,
         '#options' => $filter['options'],
       );

=== modified file 'modules/menu/menu.admin.inc'
--- modules/menu/menu.admin.inc	2010-09-29 01:57:30 +0000
+++ modules/menu/menu.admin.inc	2010-09-30 02:57:17 +0000
@@ -680,24 +680,22 @@ function menu_configure() {
   $menu_options = menu_get_menus();
 
   $main = variable_get('menu_main_links_source', 'main-menu');
+  $main_options = array_merge($menu_options, array('' => t('No Main links')));
   $form['menu_main_links_source'] = array(
     '#type' => 'select',
     '#title' => t('Source for the Main links'),
-    '#required' => FALSE,
     '#default_value' => variable_get('menu_main_links_source', 'main-menu'),
-    '#empty_option' => t('No Main links'),
-    '#options' => $menu_options,
+    '#options' => $main_options,
     '#tree' => FALSE,
     '#description' => t('Select what should be displayed as the Main links (typically at the top of the page).'),
   );
 
+  $secondary_options = array_merge($menu_options, array('' => t('No Secondary links')));
   $form['menu_secondary_links_source'] = array(
     '#type' => 'select',
     '#title' => t('Source for the Secondary links'),
-    '#required' => FALSE,
     '#default_value' => variable_get('menu_secondary_links_source', 'user-menu'),
-    '#empty_option' => t('No Secondary links'),
-    '#options' => $menu_options,
+    '#options' => $secondary_options,
     '#tree' => FALSE,
     '#description' => t("Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links (currently %main) and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links." , array('%main' => $main_options[$main])),
   );

=== modified file 'modules/simpletest/tests/form.test'
--- modules/simpletest/tests/form.test	2010-09-28 02:30:31 +0000
+++ modules/simpletest/tests/form.test	2010-09-30 04:55:48 +0000
@@ -161,48 +161,40 @@ class FormsTestCase extends DrupalWebTes
     $error = '!name field is required.';
     $this->drupalGet('form-test/select');
 
-    // Posting without any values should throw validation errors.
+    // Posting without any values should throw required errors.
     $this->drupalPost(NULL, array(), 'Submit');
-    $this->assertNoText(t($error, array('!name' => $form['select']['#title'])));
+    // If the not required, there is no error.
+    $this->assertNoText(t($error, array('!name' => $form['default_one']['#title'])));
     $this->assertNoText(t($error, array('!name' => $form['empty_value']['#title'])));
     $this->assertNoText(t($error, array('!name' => $form['empty_value_one']['#title'])));
-    $this->assertText(t($error, array('!name' => $form['no_default']['#title'])));
-    $this->assertNoText(t($error, array('!name' => $form['no_default_optional']['#title'])));
-    $this->assertText(t($error, array('!name' => $form['no_default_empty_option']['#title'])));
-    $this->assertNoText(t($error, array('!name' => $form['no_default_empty_option_optional']['#title'])));
-    $this->assertText(t($error, array('!name' => $form['no_default_empty_value']['#title'])));
-    $this->assertText(t($error, array('!name' => $form['no_default_empty_value_one']['#title'])));
-    $this->assertNoText(t($error, array('!name' => $form['no_default_empty_value_optional']['#title'])));
-    $this->assertNoText(t($error, array('!name' => $form['multiple']['#title'])));
-    $this->assertNoText(t($error, array('!name' => $form['multiple_no_default']['#title'])));
+    // #required without default should throw required errors.
     $this->assertText(t($error, array('!name' => $form['multiple_no_default_required']['#title'])));
+    $this->assertText(t($error, array('!name' => $form['no_default_required']['#title'])));
+    // if there is a default, that will be value so required does not matter.
+    $this->assertNoText(t($error, array('!name' => $form['default_required']['#title'])));
+    $elements = $this->xpath("//select/option[@value='']");
+    $this->assertEqual(count($elements), 1, t('There is only one empty option'));
+    foreach ($elements as $element) {
+      $this->assertEqual((string)$element, '- Select -', t('The empty option text is correct.'));
+      $this->assertEqual($element['selected'], 'selected', t('The empty option is selected.'));
+    }
 
     // Post values for required fields.
     $edit = array(
-      'no_default' => 'three',
-      'no_default_empty_option' => 'three',
-      'no_default_empty_value' => 'three',
-      'no_default_empty_value_one' => 'three',
       'multiple_no_default_required[]' => 'three',
+      'no_default_required' => 'three',
     );
     $this->drupalPost(NULL, $edit, 'Submit');
     $values = drupal_json_decode($this->drupalGetContent());
 
     // Verify expected values.
     $expected = array(
-      'select' => 'one',
+      'default_one' => 'one',
       'empty_value' => 'one',
       'empty_value_one' => 'one',
-      'no_default' => 'three',
-      'no_default_optional' => '',
-      'no_default_empty_option' => 'three',
-      'no_default_empty_option_optional' => '',
-      'no_default_empty_value' => 'three',
-      'no_default_empty_value_one' => 'three',
-      'no_default_empty_value_optional' => 0,
-      'multiple' => array('two' => 'two'),
-      'multiple_no_default' => array(),
       'multiple_no_default_required' => array('three' => 'three'),
+      'no_default_required' => 'three',
+      'default_required' => 'one',
     );
     foreach ($expected as $key => $value) {
       $this->assertIdentical($values[$key], $value, t('@name: @actual is equal to @expected.', array(

=== modified file 'modules/simpletest/tests/form_test.module'
--- modules/simpletest/tests/form_test.module	2010-09-27 00:53:55 +0000
+++ modules/simpletest/tests/form_test.module	2010-09-30 04:45:58 +0000
@@ -785,7 +785,7 @@ function form_test_select($form, &$form_
     '#options' => drupal_map_assoc(array('one', 'two', 'three')),
   );
 
-  $form['select'] = $base + array(
+  $form['default_one'] = $base + array(
     '#title' => '#default_value one',
     '#default_value' => 'one',
   );
@@ -800,56 +800,21 @@ function form_test_select($form, &$form_
     '#empty_value' => 'one',
   );
 
-  $form['no_default'] = $base + array(
-    '#title' => 'No #default_value',
-  );
-  $form['no_default_optional'] = $base + array(
-    '#title' => 'No #default_value, not #required',
-    '#required' => FALSE,
-    '#description' => 'Should result in an empty string (default of #empty_value), because it is optional.',
-  );
-
-  $form['no_default_empty_option'] = $base + array(
-    '#title' => 'No #default_value, #empty_option',
-    '#empty_option' => '- Choose -',
-  );
-  $form['no_default_empty_option_optional'] = $base + array(
-    '#title' => 'No #default_value, not #required, #empty_option',
-    '#required' => FALSE,
-    '#empty_option' => '- Dismiss -',
-    '#description' => 'Should result in an empty string (default of #empty_value), because it is optional.',
+  $form['multiple_no_default_required'] = $base + array(
+    '#title' => '#multiple, #required, no #default_value',
+    '#required' => TRUE,
+    '#multiple' => TRUE,
   );
 
-  $form['no_default_empty_value'] = $base + array(
-    '#title' => 'No #default_value, #empty_value 0',
-    '#empty_value' => 0,
-    '#description' => 'Should never result in 0.',
-  );
-  $form['no_default_empty_value_one'] = $base + array(
-    '#title' => 'No #default_value, #empty_value one',
-    '#empty_value' => 'one',
-    '#description' => 'A mistakenly assigned #empty_value contained in #options should not be valid.',
-  );
-  $form['no_default_empty_value_optional'] = $base + array(
-    '#title' => 'No #default_value, not #required, #empty_value 0',
-    '#required' => FALSE,
-    '#empty_value' => 0,
-    '#description' => 'Should result in 0, because it is optional.',
+  $form['no_default_required'] = $base + array(
+    '#title' => '#required, no #default_value',
+    '#required' => TRUE,
   );
 
-  $form['multiple'] = $base + array(
-    '#title' => '#multiple, #default_value two',
-    '#default_value' => array('two'),
-    '#multiple' => TRUE,
-  );
-  $form['multiple_no_default'] = $base + array(
-    '#title' => '#multiple, no #default_value',
-    '#multiple' => TRUE,
-  );
-  $form['multiple_no_default_required'] = $base + array(
-    '#title' => '#multiple, #required, no #default_value',
+  $form['default_required'] = $base + array(
+    '#title' => '#multiple, #required, #default_value = one',
     '#required' => TRUE,
-    '#multiple' => TRUE,
+    '#default_value' => 'one',
   );
 
   $form['submit'] = array('#type' => 'submit', '#value' => 'Submit');

=== modified file 'modules/system/system.admin.inc'
--- modules/system/system.admin.inc	2010-09-28 02:30:31 +0000
+++ modules/system/system.admin.inc	2010-09-30 02:57:17 +0000
@@ -2941,7 +2941,7 @@ function system_actions_manage() {
   actions_synchronize();
   $actions = actions_list();
   $actions_map = actions_actions_map($actions);
-  $options = array();
+  $options = array(t('Choose an advanced action'));
   $unconfigurable = array();
 
   foreach ($actions_map as $key => $array) {
@@ -3013,7 +3013,9 @@ function system_actions_manage_form($for
   );
   $form['parent']['action'] = array(
     '#type' => 'select',
+    '#default_value' => '',
     '#options' => $options,
+    '#description' => '',
   );
   $form['parent']['actions'] = array('#type' => 'actions');
   $form['parent']['actions']['submit'] = array(

=== modified file 'modules/system/system.module'
--- modules/system/system.module	2010-09-29 16:06:11 +0000
+++ modules/system/system.module	2010-09-30 03:47:44 +0000
@@ -399,11 +399,7 @@ function system_element_info() {
   );
   $types['select'] = array(
     '#input' => TRUE,
-    // In order to be able to determine whether a select list needs an empty
-    // default option, #required has to be NULL by default, as form_builder()
-    // preemptively sets #required to FALSE for all elements.
-    // @see form_process_select()
-    '#required' => NULL,
+    '#size' => 0,
     '#multiple' => FALSE,
     '#process' => array('form_process_select', 'ajax_process_form'),
     '#theme' => 'select',

=== modified file 'modules/trigger/trigger.admin.inc'
--- modules/trigger/trigger.admin.inc	2010-09-24 21:36:22 +0000
+++ modules/trigger/trigger.admin.inc	2010-09-30 02:57:17 +0000
@@ -177,6 +177,7 @@ function trigger_assign_form($form, $for
   );
   // List possible actions that may be assigned.
   if (count($options) != 0) {
+    array_unshift($options, t('Choose an action'));
     $form[$hook]['parent']['aid'] = array(
       '#type' => 'select',
       '#options' => $options,

