]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/aggregate.pm
add missing test to avoid uninitialised value when a page with metadata is removed
[ikiwiki.git] / IkiWiki / Plugin / aggregate.pm
index 09ea5902938b16030ab75ced886288a4e5497454..c3cbbae0553464b9c8d20fab97333c788a7290eb 100644 (file)
@@ -42,7 +42,7 @@ sub checkconfig () { #{{{
                # The parent process will then handle building the result.
                # This avoids messy code to clear state accumulated while
                # aggregating.
-               defined(my $pid = fork) or error("Cant fork: $!");
+               defined(my $pid = fork) or error("Can't fork: $!");
                if (! $pid) {
                        loadstate();
                        IkiWiki::loadindex();
@@ -66,7 +66,8 @@ sub needsbuild (@) { #{{{
        loadstate(); # if not already loaded
 
        foreach my $feed (values %feeds) {
-               if (grep { $_ eq $pagesources{$feed->{sourcepage}} } @$needsbuild) {
+               if (exists $pagesources{$page} && 
+                   grep { $_ eq $pagesources{$feed->{sourcepage}} } @$needsbuild) {
                        # Mark all feeds originating on this page as removable;
                        # preprocess will unmark those that still exist.
                        remove_feeds($feed->{sourcepage});