$this->roles["$role"] = array();
}
+ $newbuggers = $this->registry->db->query("SELECT userid FROM " . TABLE_PREFIX . "useremail WHERE relation = " . $this->registry->emailoptions['relations']['-notapplicable-'] . " AND mask & " . $this->registry->emailoptions['notifications']['newbug']);
+ while ($newbug = $this->registry->db->fetch_array($newbuggers))
+ {
+ $this->roles['-notapplicable-']["$newbug[userid]"] = $newbug['userid'];
+ }
+
$favorites = $this->registry->db->query("SELECT userid FROM " . TABLE_PREFIX . "favorite WHERE bugid = " . $this->registry->clean($this->bug['bugid'], TYPE_UINT));
while ($fav = $this->registry->db->fetch_array($favorites))
{
$this->bug['summary'],
$this->bug['bugid']
));
- $this->registry->mail->send($this->users["$userid"]['email'], $this->users["$userid"]['displayname']);
+ if (!empty($this->users["$userid"]['email']))
+ {
+ $this->registry->mail->send($this->users["$userid"]['email'], $this->users["$userid"]['displayname']);
+ }
+ else
+ {
+ $this->registry->debug("not sending an email to " . $userid . " because they don't have one?");
+ }
}
}
}