Index: taxonomy.module =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v retrieving revision 1.257 diff -u -F^f -r1.257 taxonomy.module --- taxonomy.module 29 Jan 2006 07:50:45 -0000 1.257 +++ taxonomy.module 3 Feb 2006 07:20:21 -0000 @@ -914,6 +914,10 @@ function _taxonomy_term_select($title, $ $value = $tree[0]->tid; } } + if (!array_intersect((array)$value, array_keys($options))) { + // if there are no terms selected for this vocabulary, select default option + $value = 0; + } return array('#type' => 'select', '#title' => $title, '#default_value' => $value, '#options' => $options, '#description' => $description, '#multiple' => $multiple, '#size' => $multiple ? min(9, count($options)) : 0, '#weight' => -15, '#theme' => 'taxonomy_term_select'); }