aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-01-22 20:58:49 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-01-22 20:58:49 -0500
commite1ff06b634afe790fe7661898bb20d7077d93588 (patch)
tree26b3d9e0bc9fe99d11a396c142d7b7423a420d36
parent6fb0ab580eab0149288c1ab1e7b67f3b2c69ecce (diff)
downloadikiwiki-e1ff06b634afe790fe7661898bb20d7077d93588.tar
ikiwiki-e1ff06b634afe790fe7661898bb20d7077d93588.tar.gz
fix uninitialized value warnings
I suspect these are only triggered by spammers.
-rw-r--r--IkiWiki/Plugin/comments.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 833bedf25..6d0e45a97 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -406,19 +406,19 @@ sub sessioncgi ($$) {
if ($config{comments_allowauthor}) {
my $author = $form->field('author');
- if (length $author) {
+ if (defined $author && length $author) {
$author =~ s/"/&quot;/g;
$content .= " claimedauthor=\"$author\"\n";
}
my $url = $form->field('url');
- if (length $url) {
+ if (defined $url && length $url) {
$url =~ s/"/&quot;/g;
$content .= " url=\"$url\"\n";
}
}
my $subject = $form->field('subject');
- if (length $subject) {
+ if (defined $subject && length $subject) {
$subject =~ s/"/&quot;/g;
$content .= " subject=\"$subject\"\n";
}