]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/FeedSub/extlib/xml-feed-parser-bug-16416.patch
Initial functional version of feed subscription plugin, currently supporting only...
[quix0rs-gnu-social.git] / plugins / FeedSub / extlib / xml-feed-parser-bug-16416.patch
diff --git a/plugins/FeedSub/extlib/xml-feed-parser-bug-16416.patch b/plugins/FeedSub/extlib/xml-feed-parser-bug-16416.patch
new file mode 100644 (file)
index 0000000..c53bd97
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/htdocs/lib/pear/XML/Feed/Parser/RSS2.php b/htdocs/lib/pear/XML/Feed/Parser/RSS2.php
+index c5d79d1..308a4ab 100644
+--- a/htdocs/lib/pear/XML/Feed/Parser/RSS2.php
++++ b/htdocs/lib/pear/XML/Feed/Parser/RSS2.php
+@@ -321,7 +321,8 @@ class XML_Feed_Parser_RSS2 extends XML_Feed_Parser_Type
+      */
+     function getLink($offset, $attribute = 'href', $params = array())
+     {
+-        $links = $this->model->getElementsByTagName('link');
++        $xPath = new DOMXPath($this->model);
++        $links = $xPath->query('//link');
+         if ($links->length <= $offset) {
+             return false;