]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index f2cd8f90aa27f0a963908f587f34a57fddcecf19..86b60a2b2864037ac4644fed9e0d64d5fecd3812 100644 (file)
@@ -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");
        }