--- taxonomy_other.module.orig	2009-12-18 09:15:45.000000000 +0100
+++ taxonomy_other.module	2009-12-18 09:16:04.000000000 +0100
@@ -107,7 +107,7 @@
 function taxonomy_other_form_alter(&$form, &$form_state, $form_id) {
 
   // Alter node forms.
-  if ($form_id == $form['type']['#value'] . '_node_form') {
+  if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {
     $new_fields = 0;
 
     // For taxonomy vocabularies that use taxonomy_other...
@@ -191,7 +191,7 @@
   // If a term is required and taxonomy_other is selected but empty,
   //  generate a form error like the form API would...
   foreach ($form_state['values']['taxonomy'] as $vid => $tid) {
-    if ($tid == 'taxonomy_other' && !empty($form['taxonomy'][$vid]['#required']) 
+    if ($tid == 'taxonomy_other' && !empty($form['taxonomy'][$vid]['#required'])
           && empty($form_state['values']['taxonomy']['taxonomy_other_' . $vid])) {
       form_set_error('taxonomy][' . $vid, t('!name field is required.', array('!name' => $form['taxonomy'][$vid]['#title'])));
     }
