From 42b15f763394279ec5a9b4f51031b30470c4dc92 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 15 Nov 2008 14:12:57 +0000 Subject: smcvpostcomment: avoid warnings if form field 'body' is undef --- IkiWiki/Plugin/smcvpostcomment.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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$/; -- cgit v1.2.3