From: Joey Hess Date: Wed, 9 Jun 2010 21:47:49 +0000 (-0400) Subject: let's allow comments of "0" X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/1bdf98a4a0b3a0bddbede8390df0930193d06a5a let's allow comments of "0" --- diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 86b60a2b2..b244a7431 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -433,7 +433,8 @@ sub editcomment ($$) { $content .= " date=\"" . decode_utf8(strftime('%Y-%m-%dT%H:%M:%SZ', gmtime)) . "\"\n"; - my $editcontent = $form->field('editcontent') || ''; + my $editcontent = $form->field('editcontent'); + $editcontent="" if ! defined $editcontent; $editcontent =~ s/\r\n/\n/g; $editcontent =~ s/\r/\n/g; $editcontent =~ s/"/\\"/g;