]> sipb.mit.edu Git - ikiwiki.git/commitdiff
add missing test to avoid uninitialised value when a page with metadata is removed
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 29 Jan 2008 22:36:25 +0000 (17:36 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 29 Jan 2008 22:36:25 +0000 (17:36 -0500)
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/calendar.pm
IkiWiki/Plugin/edittemplate.pm
IkiWiki/Plugin/meta.pm
IkiWiki/Plugin/version.pm

index 71368e254a960cf2545efe79ffe4b91601b34649..c3cbbae0553464b9c8d20fab97333c788a7290eb 100644 (file)
@@ -66,7 +66,8 @@ sub needsbuild (@) { #{{{
        loadstate(); # if not already loaded
 
        foreach my $feed (values %feeds) {
        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});
                        # Mark all feeds originating on this page as removable;
                        # preprocess will unmark those that still exist.
                        remove_feeds($feed->{sourcepage});
index 4bb4c2c2192ef857b61da9e63608dce2b58b5020..aed087eed58248d5da153543dba03abba17b5ef0 100644 (file)
@@ -390,7 +390,8 @@ sub needsbuild (@) { #{{{
                                # the current day
                                push @$needsbuild, $pagesources{$page};
                        }
                                # the current day
                                push @$needsbuild, $pagesources{$page};
                        }
-                       if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
+                       if (exists $pagesources{$page} && 
+                           grep { $_ eq $pagesources{$page} } @$needsbuild) {
                                # remove state, will be re-added if
                                # the calendar is still there during the
                                # rebuild
                                # remove state, will be re-added if
                                # the calendar is still there during the
                                # rebuild
index aa72b08457616c98e1bba6ce658a2beedc1b00b6..b7651ce02b3c71ac96b4a561f3ef5e22738a6a5b 100644 (file)
@@ -21,7 +21,8 @@ sub needsbuild (@) { #{{{
 
        foreach my $page (keys %pagestate) {
                if (exists $pagestate{$page}{edittemplate}) {
 
        foreach my $page (keys %pagestate) {
                if (exists $pagestate{$page}{edittemplate}) {
-                       if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
+                       if (exists $pagesources{$page} && 
+                           grep { $_ eq $pagesources{$page} } @$needsbuild) {
                                # remove state, it will be re-added
                                # if the preprocessor directive is still
                                # there during the rebuild
                                # remove state, it will be re-added
                                # if the preprocessor directive is still
                                # there during the rebuild
index 849a13e37bfb2c437ba4bc7c998710548b943f49..621e876741b288466112360b96290bac01235e52 100644 (file)
@@ -18,7 +18,8 @@ sub needsbuild (@) { #{{{
        my $needsbuild=shift;
        foreach my $page (keys %pagestate) {
                if (exists $pagestate{$page}{meta}) {
        my $needsbuild=shift;
        foreach my $page (keys %pagestate) {
                if (exists $pagestate{$page}{meta}) {
-                       if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
+                       if (exists $pagesources{$page} &&
+                           grep { $_ eq $pagesources{$page} } @$needsbuild) {
                                # remove state, it will be re-added
                                # if the preprocessor directive is still
                                # there during the rebuild
                                # remove state, it will be re-added
                                # if the preprocessor directive is still
                                # there during the rebuild
index d39fd941966b35787c32910b988b938878de4792..f96d2df06ce345d9939c356637e6e6d0e2d06e8b 100644 (file)
@@ -18,7 +18,8 @@ sub needsbuild (@) { #{{{
                        if ($pagestate{$page}{version}{shown} ne $IkiWiki::version) {
                                push @$needsbuild, $pagesources{$page};
                        }
                        if ($pagestate{$page}{version}{shown} ne $IkiWiki::version) {
                                push @$needsbuild, $pagesources{$page};
                        }
-                       if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
+                       if (exists $pagesources{$page} &&
+                           grep { $_ eq $pagesources{$page} } @$needsbuild) {
                                # remove state, will be re-added if
                                # the version is still shown during the
                                # rebuild
                                # remove state, will be re-added if
                                # the version is still shown during the
                                # rebuild