diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index 90ea9cace7b8b10fe32b61595184626a7d1855c3..0d8d0adec254a57e706ec471e3354e879f7c99fe 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -223,9 +223,6 @@ function node_type_form_validate($form, &$form_state) { // Work out what the type was before the user submitted this form $old_type = trim($form_state['values']['old_type']); - if (empty($old_type)) { - $old_type = $type->type; - } $types = node_get_types('names'); @@ -245,7 +242,7 @@ function node_type_form_validate($form, &$form_state) { $names = array_flip($types); if (isset($names[$type->name]) && $names[$type->name] != $old_type) { - form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => $names[$type->name]))); + form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => $type->name))); } }