aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-07-28 04:03:14 +0000
committerlpsolit%gmail.com <>2005-07-28 04:03:14 +0000
commitcde8a8c0b6d35868aea0f7f0e52e6119d32dcc59 (patch)
tree6e82af11ba13ee99bb17e99df56f4c49687bd35e /userprefs.cgi
parentBug 301018: Add INTERFACE section to bug/create/created.html.tmpl - Patch by ... (diff)
downloadbugzilla-cde8a8c0b6d35868aea0f7f0e52e6119d32dcc59.tar.gz
bugzilla-cde8a8c0b6d35868aea0f7f0e52e6119d32dcc59.tar.bz2
bugzilla-cde8a8c0b6d35868aea0f7f0e52e6119d32dcc59.zip
Bug 302200: uninitialized value when saving email prefs - Patch by Rob Siklos <robzilla@siklos.ca> r=LpSolit a=myk
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index 5f52a3ca7..12a05d26f 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -253,7 +253,9 @@ sub SaveEmail {
# Global positive events: a ticked box means "send me mail."
foreach my $event (GLOBAL_EVENTS) {
- if (1 == $cgi->param("email-" . REL_ANY . "-$event")) {
+ if (defined($cgi->param("email-" . REL_ANY . "-$event"))
+ && $cgi->param("email-" . REL_ANY . "-$event") == 1)
+ {
$dbh->do("INSERT INTO email_setting " .
"(user_id, relationship, event) " .
"VALUES ($userid, " . REL_ANY . ", $event)");