Fixed RSS multiple category with XML::RSS::LibXML
[catagits/XML-Feed.git] / lib / XML / Feed / Format / RSS.pm
index c4afc72..248debd 100644 (file)
@@ -253,7 +253,7 @@ sub category {
         $item->{dc}{subject} = [@tmp];
     } else {
         my $r = $item->{category} || $item->{dc}{subject};
-        my @r = ref($r)? @$r : defined $r? ($r) : ();
+        my @r = ref($r) eq 'ARRAY' ? @$r : defined $r? ($r) : ();
         return wantarray? @r : $r[0];
     }
 }