diff options
author | lpsolit%gmail.com <> | 2005-07-28 06:00:59 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-07-28 06:00:59 +0200 |
commit | 049f98eb3882ba9e2ff39b9ee5232abb21c21d19 (patch) | |
tree | 7115e0b7620d024f21dc0d1ab14eced3326d9650 | |
parent | 2cb50a4babb6127ddd93a730e4cba9b728ccffc5 (diff) | |
download | bugzilla-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-x | userprefs.cgi | 4 |
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)"); |