diff --git a/core/includes/form.inc b/core/includes/form.inc
index 49ace44..7b96379 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -1335,7 +1335,7 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) {
           $value = in_array($elements['#type'], array('checkboxes', 'tableselect')) ? array_keys($elements['#value']) : $elements['#value'];
           foreach ($value as $v) {
             if (!isset($options[$v])) {
-              form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.'));
+              form_error($elements, $t('An illegal choice in %name element has been detected. Please contact the site administrator.', array('%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])));
               watchdog('form', 'Illegal choice %choice in !name element.', array('%choice' => $v, '!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR);
             }
           }
@@ -1353,8 +1353,8 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) {
           $elements['#value'] = NULL;
           form_set_value($elements, NULL, $form_state);
         }
-        elseif (!isset($options[$elements['#value']])) {
-          form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.'));
+        elseif (!empty($elements['#value']) && !isset($options[$elements['#value']])) {
+          form_error($elements, $t('An illegal choice in %name element has been detected. Please contact the site administrator.', array('%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'])));
           watchdog('form', 'Illegal choice %choice in %name element.', array('%choice' => $elements['#value'], '%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR);
         }
       }
