Commit db64fe0a authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Issue #40: Warning on uninitialized value during delivery to the list

parent f1f00378
...@@ -1291,19 +1291,20 @@ sub get_digest_recipients_per_mode { ...@@ -1291,19 +1291,20 @@ sub get_digest_recipients_per_mode {
domain => $self->{'domain'}, domain => $self->{'domain'},
} }
); );
## test to know if the rcpt suspended her subscription for this list # Test to know if the rcpt suspended her subscription for this list.
## if yes, don't send the message # If yes, don't send the message.
if (defined $user_data->{'suspend'} if ($user_data and $user_data->{'suspend'}) {
and $user_data->{'suspend'} + 0) { if (( not $user_data->{'startdate'}
if ($user_data->{'startdate'} <= time or $user_data->{'startdate'} <= time
and (time <= $user_data->{'enddate'} )
or !$user_data->{'enddate'}) and (not $user_data->{'enddate'}
or time <= $user_data->{'enddate'})
) { ) {
next; next;
} elsif ($user_data->{'enddate'} < time } elsif ($user_data->{'enddate'}
and $user_data->{'enddate'}) { and $user_data->{'enddate'} < time) {
## If end date is < time, update the BDD by deleting the # If end date is < time, update subscriber by deleting the
## suspending's data # suspension setting.
$self->restore_suspended_subscription($user->{'email'}); $self->restore_suspended_subscription($user->{'email'});
} }
} }
...@@ -1381,21 +1382,21 @@ sub get_recipients_per_mode { ...@@ -1381,21 +1382,21 @@ sub get_recipients_per_mode {
} }
); );
# test to know if the rcpt suspended her subscription for this list # Test to know if the rcpt suspended her subscription for this list.
# if yes, don't send the message # if yes, don't send the message.
if ( $user_data if ($user_data and $user_data->{'suspend'}) {
and defined $user_data->{'suspend'} if (( not $user_data->{'startdate'}
and $user_data->{'suspend'} + 0) { or $user_data->{'startdate'} <= time
if (($user_data->{'startdate'} <= time) )
&& ( (time <= $user_data->{'enddate'}) and (not $user_data->{'enddate'}
|| (!$user_data->{'enddate'})) or time <= $user_data->{'enddate'})
) { ) {
push @tabrcpt_nomail_verp, $user->{'email'}; push @tabrcpt_nomail_verp, $user->{'email'};
next; next;
} elsif (($user_data->{'enddate'} < time) } elsif ($user_data->{'enddate'}
&& ($user_data->{'enddate'})) { and $user_data->{'enddate'} < time) {
## If end date is < time, update the BDD by deleting the # If end date is < time, update subscriber by deleting the
## suspending's data # suspension setting.
$self->restore_suspended_subscription($user->{'email'}); $self->restore_suspended_subscription($user->{'email'});
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment