smcvpostcomment: avoid warnings if form field 'body' is undef
parent
e65c7b73af
commit
42b15f7633
|
@ -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$/;
|
||||||
|
|
Loading…
Reference in New Issue