summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.admin.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.admin.inc')
-rw-r--r--modules/taxonomy/taxonomy.admin.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index 177db165e..d92214086 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -222,7 +222,7 @@ function taxonomy_form_vocabulary_validate($form, &$form_state) {
// Do not allow duplicate machine names.
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vocabulary) {
- if ($machine_name == $vocabulary->machine_name && (!(isset($form_state['values']['vid']) && $vocabulary->vid != $form_state['values']['vid']))) {
+ if ($machine_name == $vocabulary->machine_name && (!isset($form_state['values']['vid']) || $vocabulary->vid != $form_state['values']['vid'])) {
form_set_error('machine_name', t('This machine-readable name is already in use by another vocabulary and must be unique.'));
}
}