diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-09-17 18:19:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-09-17 18:19:52 -0400 |
commit | 914c92c4e1eb69ae5cbd3d8f10c577b7d38195f4 (patch) | |
tree | 9e5e74414d16f0fca6c4d3cd80c4e8a8f7e8bf9c | |
parent | 18d086dde871210c7cc9ca754b9ee3297306a676 (diff) | |
download | ikiwiki-914c92c4e1eb69ae5cbd3d8f10c577b7d38195f4.tar ikiwiki-914c92c4e1eb69ae5cbd3d8f10c577b7d38195f4.tar.gz |
fix check for nonexistant content
-rw-r--r-- | IkiWiki/Plugin/aggregate.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index f47dc58b3..2b40625db 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -520,10 +520,10 @@ sub aggregate (@) { #{{{ } foreach my $entry ($f->entries) { - my $content=$content=$entry->content; + my $content=$content=$entry->content->body; # atom feeds may have no content, only a summary - if (! defined $content) { - $content=$entry->summary; + if (! defined $content && ref $entry->summary) { + $content=$entry->summary->body; } add_page( @@ -531,7 +531,7 @@ sub aggregate (@) { #{{{ copyright => $f->copyright, title => defined $entry->title ? decode_entities($entry->title) : "untitled", link => $entry->link, - content => defined $content ? $content->body : "", + content => defined $content ? $content : "", guid => defined $entry->id ? $entry->id : time."_".$feed->{name}, ctime => $entry->issued ? ($entry->issued->epoch || time) : time, ); |