]> git.wh0rd.org Git - tt-rss.git/commitdiff
Feedparser: Add important check for unknown feed type detection
authorwltb <wltb@localhost.com>
Thu, 26 Sep 2013 22:13:55 +0000 (00:13 +0200)
committerwltb <wltb@localhost.com>
Thu, 26 Sep 2013 22:13:55 +0000 (00:13 +0200)
classes/feedparser.php

index 4eaeb242900d0b244d43ba882f698341c8c06774..1c97e496b25b09bd4fd69b572f5c47530128bd8c 100644 (file)
@@ -93,7 +93,7 @@ class FeedParser {
 
                $root = $xpath->query("(//atom03:feed|//atom:feed|//channel|//rdf:rdf|//rdf:RDF)");
 
-               if ($root) {
+               if ($root && $root->length > 0) {
                        $root = $root->item(0);
 
                        if ($root) {