]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
avoid uninitialized value
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 19 Dec 2008 22:57:09 +0000 (17:57 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 19 Dec 2008 22:57:09 +0000 (17:57 -0500)
This can happen when a new field,
such as the new lasttry, is added.

IkiWiki/Plugin/aggregate.pm

index 9b531b6128c1de09d81e9c1b60da25ab736e2732..97dd036f6f4ca2816b6a2beee0f8aeefbbc0d405 100644 (file)
@@ -343,7 +343,8 @@ sub savestate () {
                                push @line, "tag=$_" foreach @{$data->{tags}};
                        }
                        else {
-                               push @line, "$field=".$data->{$field};
+                               push @line, "$field=".$data->{$field}
+                                       if defined $data->{$field};
                        }
                }
                print OUT join(" ", @line)."\n" || error("write $newfile: $!", $cleanup);