mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:00:16 +00:00
commit
d47d45e83f
1 changed files with 2 additions and 2 deletions
|
@ -437,14 +437,14 @@ class Feed
|
|||
$enclosures = $xpath->query("enclosure|atom:link[@rel='enclosure']", $entry);
|
||||
foreach ($enclosures AS $enclosure) {
|
||||
$href = "";
|
||||
$length = "";
|
||||
$length = 0;
|
||||
$type = "";
|
||||
|
||||
foreach ($enclosure->attributes AS $attribute) {
|
||||
if (in_array($attribute->name, ["url", "href"])) {
|
||||
$href = $attribute->textContent;
|
||||
} elseif ($attribute->name == "length") {
|
||||
$length = $attribute->textContent;
|
||||
$length = (int)$attribute->textContent;
|
||||
} elseif ($attribute->name == "type") {
|
||||
$type = $attribute->textContent;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue