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
Родитель 55812617d9
Коммит e6cf71b9a3
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)");