From: Michael Vogel Date: Wed, 4 Nov 2020 06:58:04 +0000 (+0100) Subject: Fix fatal error "Argument 2 passed to Friendica\Model\Post\Media::getAttachElement... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf50f803996cb4a833fe23217320db2d0e150968;p=friendica.git Fix fatal error "Argument 2 passed to Friendica\Model\Post\Media::getAttachElement() must be of the type int, string given" --- diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 4eb638be39..ff35e97505 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -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; }