summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index f2cd8f90a..86b60a2b2 100644
--- 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 $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");
}
@@ -928,7 +928,7 @@ sub match_comment_pending ($$;@) {
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");
}