aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-09-27 15:44:04 -0400
committerJoey Hess <joey@kitenet.net>2010-09-27 15:44:04 -0400
commit00595b62be624b2b105a7b137d0502d235e55f87 (patch)
treeeb0c1dc93cfe4830518f29e592d223350b3ee600
parent3d3af6983d32b41143d5e64ac90c44d1bc829d07 (diff)
downloadikiwiki-00595b62be624b2b105a7b137d0502d235e55f87.tar
ikiwiki-00595b62be624b2b105a7b137d0502d235e55f87.tar.gz
avoid fatal error if aggregate page template could not be found
That template is user-controlled.
-rw-r--r--IkiWiki/Plugin/aggregate.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index fe53d868d..9b70e5df0 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -644,7 +644,14 @@ sub add_page (@) {
$guid->{md5}=$digest;
# Create the page.
- my $template=template($feed->{template}, blind_cache => 1);
+ my $template;
+ eval {
+ $template=template($feed->{template}, blind_cache => 1);
+ };
+ if ($@) {
+ print STDERR gettext("failed to process template:")." $@";
+ return;
+ }
$template->param(title => $params{title})
if defined $params{title} && length($params{title});
$template->param(content => wikiescape(htmlabs($params{content},