We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b28528d + fbc0674 commit 37af097Copy full SHA for 37af097
lib/Plagger/Plugin/Namespace/MediaRSS.pm
@@ -20,6 +20,7 @@ sub handle {
20
$content = [ $content ] unless ref $content && ref $content eq 'ARRAY';
21
22
for my $media_content (@{$content}) {
23
+ next unless ref($media_content) eq 'HASH' && exists($media_content->{url}) && exists($media_content->{type});
24
my $enclosure = Plagger::Enclosure->new;
25
$enclosure->url( URI->new($media_content->{url}) );
26
$enclosure->auto_set_type($media_content->{type});
@@ -31,7 +32,7 @@ sub handle {
31
32
url => $thumbnail->{url},
33
width => $thumbnail->{width},
34
height => $thumbnail->{height},
- });
35
+ }) if ref($thumbnail) eq 'HASH';
36
}
37
38
0 commit comments