summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-07-28 06:00:59 +0200
committerlpsolit%gmail.com <>2005-07-28 06:00:59 +0200
commit049f98eb3882ba9e2ff39b9ee5232abb21c21d19 (patch)
tree7115e0b7620d024f21dc0d1ab14eced3326d9650
parent2cb50a4babb6127ddd93a730e4cba9b728ccffc5 (diff)
downloadbugzilla-049f98eb3882ba9e2ff39b9ee5232abb21c21d19.tar.gz
bugzilla-049f98eb3882ba9e2ff39b9ee5232abb21c21d19.tar.xz
Bug 302200: uninitialized value when saving email prefs - Patch by Rob Siklos <robzilla@siklos.ca> r=LpSolit a=myk
-rwxr-xr-xuserprefs.cgi4
1 files changed, 3 insertions, 1 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index be6f40b04..57cbda28c 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)");