Index: primary_term.module
===================================================================
--- primary_term.module	(revision 5547)
+++ primary_term.module	(working copy)
@@ -127,30 +127,32 @@ function primary_term_form_alter(&$form,
         }
       }
 
-      $default_value = array();
-      if (isset($node->primaryterm)) {
-        $default_value = $node->primaryterm;
-      }
+      if (!empty($options)) {
+        $default_value = array();
+        if (isset($node->primaryterm)) {
+          $default_value = $node->primaryterm;
+        }
 
-      // if the primary term is not required, we add the option to ignore it
-      $required = variable_get('pt_required_'. $node_type, FALSE);
-      if (!$required) {
-        // avoid reindexing of the array
-        $options = array(t('- None -')) + $options;
-      }
+        // if the primary term is not required, we add the option to ignore it
+        $required = variable_get('pt_required_'. $node_type, FALSE);
+        if (!$required) {
+          // avoid reindexing of the array
+          $options = array(t('- None -')) + $options;
+        }
 
-      $form['primaryterm'] = array(
-        '#type' => 'select',
-        '#title' => variable_get('pt_title_'. $node_type, t('Primary term')),
-        '#description' => t('Select a primary term for this %type.', array('%type' => $node_type)),
-        '#options' => $options,
-        '#default_value' => $default_value,
-        '#required' => $required,
-        '#theme' => 'taxonomy_term_select',
-      );
+        $form['primaryterm'] = array(
+          '#type' => 'select',
+          '#title' => variable_get('pt_title_'. $node_type, t('Primary term')),
+          '#description' => t('Select a primary term for this %type.', array('%type' => $node_type)),
+          '#options' => $options,
+          '#default_value' => $default_value,
+          '#required' => $required,
+          '#theme' => 'taxonomy_term_select',
+        );
 
-      if (module_exists('content')) {
-        $form['primaryterm']['#weight'] = content_extra_field_weight($node_type, 'primary_term');
+        if (module_exists('content')) {
+          $form['primaryterm']['#weight'] = content_extra_field_weight($node_type, 'primary_term');
+        }
       }
     }
   }
