Bug 302200: uninitialized value when saving email prefs - Patch by Rob Siklos <robzilla@siklos.ca> r=LpSolit a=myk

This commit is contained in:
lpsolit%gmail.com 2005-07-27 21:00:59 +00:00
Родитель a60d418e65
Коммит 2b8a8b2f6b
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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)");