Index: tac_lite.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tac_lite/tac_lite.module,v
retrieving revision 1.6.2.3
diff -u -r1.6.2.3 tac_lite.module
--- tac_lite.module	12 Dec 2007 13:42:00 -0000	1.6.2.3
+++ tac_lite.module	17 Mar 2008 16:57:58 -0000
@@ -358,20 +358,23 @@
   }
 
   // the vocabularies containing protected info.
-  $vids = variable_get('tac_lite_categories', array(0));
+  $vids = variable_get('tac_lite_categories', array());
 
   // the terms this user is allowed to see
   $tids = _tac_lite_user_tids($user);
 
-  switch ($primary_field) {
-  case 'tid':
-	// prevent users from seeing terms they do not have permission to read.
-    $join = "LEFT JOIN {term_data} catd ON $primary_table.tid = catd.tid";
-    $where = "$primary_table.tid IN (". implode(', ', $tids) .") OR catd.vid NOT IN (". implode(',', $vids) .")"; 
-    return array('join' => $join, 'where' => $where);
-    break;
-  case 'vid':
-	
-	break;
+  // vids may be empty if tac_lite has not been configured
+  if (is_array($vids) && count($vids)) {
+    switch ($primary_field) {
+      case 'tid':
+        // prevent users from seeing terms they do not have permission to read.
+        $join = "LEFT JOIN {term_data} catd ON $primary_table.tid = catd.tid";
+        $where = "$primary_table.tid IN (". implode(', ', $tids) .") OR catd.vid NOT IN (". implode(',', $vids) .")"; 
+        return array('join' => $join, 'where' => $where);
+        break;
+      case 'vid':
+        
+        break;
+    }
   }
 }
