]> git.mxchange.org Git - friendica.git/commitdiff
Remove misleading concatenation in XPath expression in Protocol\Feed
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 12 May 2023 10:06:34 +0000 (06:06 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 12 May 2023 10:06:34 +0000 (06:06 -0400)
- Variable could be directly interpolated
- Address https://github.com/friendica/friendica/issues/13025#issuecomment-1543335001
- Address https://github.com/friendica/friendica/issues/13025#issuecomment-1545074703

src/Protocol/Feed.php

index d4eeae61e7241b964f050c8a9644dfb989c5006e..fced3526d49ff4e96ea4b6648070a03c2c234f6a 100644 (file)
@@ -478,7 +478,7 @@ class Feed
 
                        $attachments = [];
 
-                       $enclosures = $xpath->query("enclosure|' . $atomns . ':link[@rel='enclosure']", $entry);
+                       $enclosures = $xpath->query("enclosure|$atomns:link[@rel='enclosure']", $entry);
                        if (!empty($enclosures)) {
                                foreach ($enclosures as $enclosure) {
                                        $href = '';