]> git.mxchange.org Git - friendica.git/commitdiff
Fix fatal error "Argument 2 passed to Friendica\Model\Post\Media::getAttachElement...
authorMichael Vogel <icarus@dabo.de>
Wed, 4 Nov 2020 06:58:04 +0000 (07:58 +0100)
committerMichael Vogel <icarus@dabo.de>
Wed, 4 Nov 2020 06:58:04 +0000 (07:58 +0100)
src/Protocol/Feed.php

index 4eb638be394a7ce9a277eb1f66a054b1481e9887..ff35e975052939b0fbb1fa297829eb09fbbd43c1 100644 (file)
@@ -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;
                                        }