diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-11-15 14:12:57 +0000 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-12-11 21:14:01 +0000 |
commit | 42b15f763394279ec5a9b4f51031b30470c4dc92 (patch) | |
tree | aa10e50ac94ba805693ca1f643709c80ed59ee31 | |
parent | e65c7b73af6dcb9f8dc0435f17ea3beeab66f175 (diff) |
smcvpostcomment: avoid warnings if form field 'body' is undef
-rw-r--r-- | IkiWiki/Plugin/smcvpostcomment.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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$/; |