summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
diff options
context:
space:
mode:
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 92e110f3b..9c2135eb3 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -232,7 +232,9 @@ sub SaveEmail {
foreach my $rel (RELATIONSHIPS) {
# Positive events: a ticked box means "send me mail."
foreach my $event (POS_EVENTS) {
- if (1 == $cgi->param("email-$rel-$event")) {
+ if (defined($cgi->param("email-$rel-$event"))
+ && $cgi->param("email-$rel-$event") == 1)
+ {
$dbh->do("INSERT INTO email_setting " .
"(user_id, relationship, event) " .
"VALUES ($userid, $rel, $event)");