Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.879
diff -u -p -r1.879 node.module
--- modules/node/node.module	5 Sep 2007 08:42:01 -0000	1.879
+++ modules/node/node.module	9 Sep 2007 18:17:17 -0000
@@ -361,13 +361,13 @@ function node_get_types($op = 'types', $
     case 'types':
       return $_node_types;
     case 'type':
-      return $_node_types[$type];
+      return isset($_node_types[$type]) ? $_node_types[$type] : FALSE;
     case 'module':
-      return $_node_types[$type]->module;
+      return isset($_node_types[$type]->module) ? $_node_types[$type]->module : FALSE;
     case 'names':
       return $_node_names;
     case 'name':
-      return $_node_names[$type];
+      return isset($_node_names[$type]) ? $_node_names[$type] : FALSE;
   }
 }
 
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.379
diff -u -p -r1.379 taxonomy.module
--- modules/taxonomy/taxonomy.module	6 Sep 2007 13:03:18 -0000	1.379
+++ modules/taxonomy/taxonomy.module	9 Sep 2007 18:17:18 -0000
@@ -387,9 +387,16 @@ function taxonomy_get_vocabularies($type
   $vocabularies = array();
   $node_types = array();
   while ($voc = db_fetch_object($result)) {
-    $node_types[$voc->vid][] = $voc->type;
-    unset($voc->type);
-    $voc->nodes = $node_types[$voc->vid];
+    // If no node types are associated with a vocabulary, the LEFT JOIN will
+    // return a NULL value for type.
+    if (isset($voc->type)) {
+      $node_types[$voc->vid][] = $voc->type;
+      unset($voc->type);
+      $voc->nodes = $node_types[$voc->vid];
+    }
+    elseif (!isset($voc->nodes)) {
+      $voc->nodes = array();
+    }
     $vocabularies[$voc->vid] = $voc;
   }
 
@@ -777,7 +784,7 @@ function taxonomy_term_count_nodes($tid,
       $count[$type][$term->tid] = $term->c;
     }
   }
-
+  $children_count = 0;
   foreach (_taxonomy_term_children($tid) as $c) {
     $children_count += taxonomy_term_count_nodes($c, $type);
   }
@@ -805,7 +812,7 @@ function _taxonomy_term_children($tid) {
       $children[$term->parent][] = $term->tid;
     }
   }
-  return $children[$tid] ? $children[$tid] : array();
+  return isset($children[$tid]) ? $children[$tid] : array();
 }
 
 /**
