mirror of https://tt-rss.org/git/tt-rss.git
parser: fix failing on empty media:group tags
This commit is contained in:
parent
de0d8d1088
commit
2ab7ccb695
|
@ -160,6 +160,7 @@ class FeedItem_Atom extends FeedItem_Common {
|
|||
|
||||
$content = $this->xpath->query("media:content", $enclosure)->item(0);
|
||||
|
||||
if ($content) {
|
||||
$enc->type = $content->getAttribute("type");
|
||||
$enc->link = $content->getAttribute("url");
|
||||
$enc->length = $content->getAttribute("length");
|
||||
|
@ -174,6 +175,7 @@ class FeedItem_Atom extends FeedItem_Common {
|
|||
|
||||
array_push($encs, $enc);
|
||||
}
|
||||
}
|
||||
|
||||
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
|
||||
|
||||
|
|
|
@ -140,6 +140,7 @@ class FeedItem_RSS extends FeedItem_Common {
|
|||
|
||||
$content = $this->xpath->query("media:content", $enclosure)->item(0);
|
||||
|
||||
if ($content) {
|
||||
$enc->type = $content->getAttribute("type");
|
||||
$enc->link = $content->getAttribute("url");
|
||||
$enc->length = $content->getAttribute("length");
|
||||
|
@ -154,6 +155,7 @@ class FeedItem_RSS extends FeedItem_Common {
|
|||
|
||||
array_push($encs, $enc);
|
||||
}
|
||||
}
|
||||
|
||||
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
|
||||
|
||||
|
|
Loading…
Reference in New Issue