From: Joey Hess <joey@kitenet.net>
Date: Wed, 9 Jun 2010 21:47:49 +0000 (-0400)
Subject: let's allow comments of "0"
X-Git-Tag: 3.20100610~9
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/1bdf98a4a0b3a0bddbede8390df0930193d06a5a?ds=inline

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;