? notifications_team_hook_comment.patch
Index: notifications_team.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/notifications_team/notifications_team.module,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 notifications_team.module
--- notifications_team.module	18 Jan 2009 15:43:49 -0000	1.1.2.7
+++ notifications_team.module	22 Feb 2009 19:59:14 -0000
@@ -270,20 +270,23 @@ function notifications_team_comment(&$co
   switch ($op) {
     case 'insert':
     case 'update':
-      $uids =  explode(',', $comment['notifications_team']['selected']);
-
-      if ($comment['notifications_team']['listed']) {
-        $textunames = explode(',', $comment['notifications_team']['listed']);
-        foreach($textunames AS $uname) {
-          $u = db_fetch_object(db_query("SELECT uid FROM users WHERE name = '%s'", trim($uname)));
-          if ($u) {
-            $uids[] = $u->uid;
+      // Only run if the notifications_team key is actually set.
+      if (isset($comment['notifications_team'])) {
+        $uids =  explode(',', $comment['notifications_team']['selected']);
+
+        if ($comment['notifications_team']['listed']) {
+          $textunames = explode(',', $comment['notifications_team']['listed']);
+          foreach($textunames AS $uname) {
+            $u = db_fetch_object(db_query("SELECT uid FROM users WHERE name = '%s'", trim($uname)));
+            if ($u) {
+              $uids[] = $u->uid;
+            }
           }
         }
+
+        $nid = $comment['nid'];
+        notifications_team_update($nid, $uids);
       }
-      
-      $nid = $comment['nid'];
-      notifications_team_update($nid, $uids);      
       break;
   }
 }
