Commit 3f90fcd6 authored by sikeda's avatar sikeda
Browse files

[bug] sympa_msg.pl will be crashed by messages with empty body (messages consist only of header).

Though this bug had been found during 6.2alpha (r11232), it was fixed imperfectly.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12295 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 614cc549
......@@ -970,9 +970,10 @@ sub as_entity {
my $self = shift;
unless (defined $self->{_entity_cache}) {
die 'Bug in logic. Ask developer'
unless $self->{_head} and defined $self->{_body};
my $string = $self->{_head}->as_string . "\n" . $self->{_body};
die 'Bug in logic. Ask developer' unless $self->{_head};
my $string =
$self->{_head}->as_string . "\n"
. (defined $self->{_body} ? $self->{_body} : '');
my $parser = MIME::Parser->new();
$parser->output_to_core(1);
......
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