From: Simon McVittie Date: Sat, 15 Nov 2008 14:12:57 +0000 (+0000) Subject: smcvpostcomment: avoid warnings if form field 'body' is undef X-Git-Tag: 2.71~148 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42b15f763394279ec5a9b4f51031b30470c4dc92;p=ikiwiki.git smcvpostcomment: avoid warnings if form field 'body' is undef --- diff --git a/IkiWiki/Plugin/smcvpostcomment.pm b/IkiWiki/Plugin/smcvpostcomment.pm index 9d3f3e858..367f2d9b3 100644 --- a/IkiWiki/Plugin/smcvpostcomment.pm +++ b/IkiWiki/Plugin/smcvpostcomment.pm @@ -189,7 +189,7 @@ sub sessioncgi ($$) { #{{{ 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/g; $body .= "\n" if $body !~ /\n$/;