sub match_page ($$;@) {
my $page=shift;
my $match=match_glob($page, shift, @_);
- if ($match && ! defined IkiWiki::pagetype($IkiWiki::pagesources{$page})) {
+ if ($match && ! (exists $IkiWiki::pagesources{$page}
+ && defined IkiWiki::pagetype($IkiWiki::pagesources{$page}))) {
return IkiWiki::FailReason->new("$page is not a page");
}
else {
--[[Joey]]
+[[done]] -- the new `page()` pagespec needed to check if there was a source
+file for the page, and was leaking undef.
+
<pre>
427250f..ff6c054 master -> origin/master
Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.