summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index d93ff7374..2a3a84d9a 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1797,7 +1797,8 @@ sub pagespec_match ($$;@) {
}
my $sub=pagespec_translate($spec);
- return IkiWiki::FailReason->new("syntax error in pagespec \"$spec\"") if $@;
+ return IkiWiki::FailReason->new("syntax error in pagespec \"$spec\"")
+ if $@ || ! defined $sub;
return $sub->($page, @params);
}