smcvpostcomment: avoid warnings if form field 'body' is undef

master
Simon McVittie 2008-11-15 14:12:57 +00:00
parent e65c7b73af
commit 42b15f7633
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ sub sessioncgi ($$) { #{{{
my ($authorurl, $author) = linkuser(getcgiuser($session)); my ($authorurl, $author) = linkuser(getcgiuser($session));
my $body = $form->field('body'); my $body = $form->field('body') || '';
$body =~ s/\r\n/\n/g; $body =~ s/\r\n/\n/g;
$body =~ s/\r/\n/g; $body =~ s/\r/\n/g;
$body .= "\n" if $body !~ /\n$/; $body .= "\n" if $body !~ /\n$/;