diff -u b/core/includes/form.inc b/core/includes/form.inc --- b/core/includes/form.inc +++ b/core/includes/form.inc @@ -2341,8 +2341,9 @@ // When there's user input (including NULL), return it as the value. // However, if NULL is submitted, _form_builder_handle_input_element() will // apply the default value, and we want that validated against #options - // unless it's NULL or FALSE. - if (!isset($input) && isset($element['#default_value']) && $element['#default_value'] !== FALSE) { + // unless it's empty. (An empty #default_value, such as NULL or FALSE, can + // be used to indicate that no radio button is selected by default.) + if (!isset($input) && !empty($element['#default_value'])) { $element['#needs_validation'] = TRUE; } return $input; @@ -2351,8 +2352,8 @@ // For default value handling, simply return #default_value. Additionally, // for a NULL default value, set #has_garbage_value to prevent // _form_builder_handle_input_element() converting the NULL to an empty - // string, so that code can distinguish between nothing selected and a - // radio button whose value is empty string selected. + // string, so that code can distinguish between nothing selected and the + // selection of a radio button whose value is an empty string. $value = isset($element['#default_value']) ? $element['#default_value'] : NULL; if (!isset($value)) { $element['#has_garbage_value'] = TRUE;