diff --git a/core/includes/form.inc b/core/includes/form.inc
index c3571f4..d38a20f 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -2656,6 +2656,10 @@ function form_select_options($element, $choices = NULL) {
   if (!isset($choices)) {
     $choices = $element['#options'];
   }
+  // If there are no choices, <option> elements cannot be created
+  if (!is_array($choices)) {
+    return '';
+  }
   // array_key_exists() accommodates the rare event where $element['#value'] is NULL.
   // isset() fails in this situation.
   $value_valid = isset($element['#value']) || array_key_exists('#value', $element);
