projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9467b21
)
fix uninitalized value warning
author
Joey Hess
<joey@kitenet.net>
Fri, 21 May 2010 22:03:21 +0000
(18:03 -0400)
committer
Joey Hess
<joey@kitenet.net>
Fri, 21 May 2010 22:03:21 +0000
(18:03 -0400)
IkiWiki/Plugin/comments.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/comments.pm
b/IkiWiki/Plugin/comments.pm
index f2cd8f90aa27f0a963908f587f34a57fddcecf19..86b60a2b2864037ac4644fed9e0d64d5fecd3812 100644
(file)
--- a/
IkiWiki/Plugin/comments.pm
+++ b/
IkiWiki/Plugin/comments.pm
@@
-913,7
+913,7
@@
sub match_comment ($$;@) {
my $source=exists $IkiWiki::pagesources{$page} ?
$IkiWiki::pagesources{$page} :
$IkiWiki::delpagesources{$page};
my $source=exists $IkiWiki::pagesources{$page} ?
$IkiWiki::pagesources{$page} :
$IkiWiki::delpagesources{$page};
- my $type=
IkiWiki::pagetype($source)
;
+ my $type=
defined $source ? IkiWiki::pagetype($source) : undef
;
if (! defined $type || $type ne "_comment") {
return IkiWiki::FailReason->new("$page is not a comment");
}
if (! defined $type || $type ne "_comment") {
return IkiWiki::FailReason->new("$page is not a comment");
}
@@
-928,7
+928,7
@@
sub match_comment_pending ($$;@) {
my $source=exists $IkiWiki::pagesources{$page} ?
$IkiWiki::pagesources{$page} :
$IkiWiki::delpagesources{$page};
my $source=exists $IkiWiki::pagesources{$page} ?
$IkiWiki::pagesources{$page} :
$IkiWiki::delpagesources{$page};
- my $type=
IkiWiki::pagetype($source)
;
+ my $type=
defined $source ? IkiWiki::pagetype($source) : undef
;
if (! defined $type || $type ne "_comment_pending") {
return IkiWiki::FailReason->new("$page is not a pending comment");
}
if (! defined $type || $type ne "_comment_pending") {
return IkiWiki::FailReason->new("$page is not a pending comment");
}