diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-01-22 20:58:49 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-01-22 20:58:49 -0500 |
commit | e1ff06b634afe790fe7661898bb20d7077d93588 (patch) | |
tree | 26b3d9e0bc9fe99d11a396c142d7b7423a420d36 /IkiWiki/Plugin | |
parent | 6fb0ab580eab0149288c1ab1e7b67f3b2c69ecce (diff) |
fix uninitialized value warnings
I suspect these are only triggered by spammers.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 6 |
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/"/"/g; $content .= " claimedauthor=\"$author\"\n"; } my $url = $form->field('url'); - if (length $url) { + if (defined $url && length $url) { $url =~ s/"/"/g; $content .= " url=\"$url\"\n"; } } my $subject = $form->field('subject'); - if (length $subject) { + if (defined $subject && length $subject) { $subject =~ s/"/"/g; $content .= " subject=\"$subject\"\n"; } |