avoid uninitialized value warning
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 18 Nov 2008 18:46:03 +0000 (13:46 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 18 Nov 2008 18:46:03 +0000 (13:46 -0500)
IkiWiki/Plugin/aggregate.pm

index 6cdbbc0e91e4bccac8e8c55a2078ad4200978611..adaa619ab1a255d5904c71bc100c52c2fb10b414 100644 (file)
@@ -535,7 +535,7 @@ sub aggregate (@) { #{{{
                                copyright => $f->copyright,
                                title => defined $entry->title ? decode_entities($entry->title) : "untitled",
                                link => $entry->link,
-                               content => defined $c ? $c->body : "",
+                               content => (defined $c && defined $c->body) ? $c->body : "",
                                guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
                                ctime => $entry->issued ? ($entry->issued->epoch || time) : time,
                                base => (defined $c && $c->can("base")) ? $c->base : undef,