Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.425
diff -u -F^f -r1.425 forum.module
--- modules/forum/forum.module	25 Oct 2007 15:32:55 -0000	1.425
+++ modules/forum/forum.module	1 Nov 2007 22:50:26 -0000
@@ -160,8 +160,18 @@ function forum_init() {
  * Implementation of hook_nodeapi().
  */
 function forum_nodeapi(&$node, $op, $teaser, $page) {
+  // We are going to return if $node->type is not one of the node
+  // types assigned to the forum vocabulary.  If forum_nav_vocabulary
+  // is undefined or the vocabulary does not exist, it clearly cannot
+  // be assigned to $node->type, so return to avoid E_ALL warnings.
   $vid = variable_get('forum_nav_vocabulary', '');
+  if (empty($vid)) {
+    return;
+  }
   $vocabulary = taxonomy_vocabulary_load($vid);
+  if (empty($vocabulary)) {
+    return;
+  }
 
   // Operate only on node types assigned for the forum vocabulary.
   if (!in_array($node->type, $vocabulary->nodes)) {
