? sites/default/settings.php
? sites/default/files/.htaccess
? sites/default/files/simpletest
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.308
diff -u -p -r1.308 form.inc
--- includes/form.inc	3 Dec 2008 16:32:21 -0000	1.308
+++ includes/form.inc	9 Dec 2008 00:58:41 -0000
@@ -1429,7 +1429,14 @@ function form_select_options($element, $
   $value_is_array = is_array($element['#value']);
   $options = '';
   foreach ($choices as $key => $choice) {
-    if (is_array($choice)) {
+    if (!is_array($choice)) {
+      $choice = array('#value' => $choice);
+    }
+    elseif (!isset($choice['#value'])) {
+      $choice = array('#value' => array_shift($choice));
+    }
+
+    if (isset($choice['#options']) && is_array($choice['#options'])) {
       $options .= '<optgroup label="' . $key . '">';
       $options .= form_select_options($element, $choice);
       $options .= '</optgroup>';
@@ -1445,7 +1452,8 @@ function form_select_options($element, $
       else {
         $selected = '';
       }
-      $options .= '<option value="' . check_plain($key) . '"' . $selected . '>' . check_plain($choice) . '</option>';
+      $attributes = (isset($choice['#attributes']) ? drupal_attributes($choice['#attributes']) : '');
+      $options .= '<option value="' . check_plain($key) . '"' . $selected . $attributes . '>' . check_plain($choice['#value']) . '</option>';
     }
   }
   return $options;
