]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
smcvpostcomment: avoid warnings if form field 'body' is undef
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sat, 15 Nov 2008 14:12:57 +0000 (14:12 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 11 Dec 2008 21:14:01 +0000 (21:14 +0000)
IkiWiki/Plugin/smcvpostcomment.pm

index 9d3f3e858e3e94781ecc46ff51becb3f5ec61d97..367f2d9b3c56a5fcc881c5acf33208c985ddf711 100644 (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/g;
        $body .= "\n" if $body !~ /\n$/;
        $body =~ s/\r\n/\n/g;
        $body =~ s/\r/\n/g;
        $body .= "\n" if $body !~ /\n$/;