Permalink
Browse files

Return `undef` when no body.

This makes the module more tolerante of invalid Atom feeds.
  • Loading branch information...
1 parent c7becfb commit 57c0b0e5310841e3981222d2ba178e9946d8961b @theory theory committed with Jun 2, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Data/Feed/Atom/Entry.pm
@@ -65,7 +65,7 @@ sub content {
}
$entry->entry->content(XML::Atom::Content->new(%param, Version => 1.0));
} else {
- my $c = $entry->entry->content;
+ my $c = $entry->entry->content or return;
# map Atom types to MIME types
my $type = $c ? $c->type : undef;

0 comments on commit 57c0b0e

Please sign in to comment.