فهرست منبع

Zend_Feed: fixed rss1.0/RDF feed parsing problem. Closes [ZF-405].

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@15360 44c647ce-9c0f-0410-b52a-842ac1e357ba
alexander 16 سال پیش
والد
کامیت
8f444fb683
1فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 4 3
      library/Zend/Feed/Rss.php

+ 4 - 3
library/Zend/Feed/Rss.php

@@ -80,9 +80,10 @@ class Zend_Feed_Rss extends Zend_Feed_Abstract
         parent::__wakeup();
 
         // Find the base channel element and create an alias to it.
-        if ($this->_element->firstChild->nodeName == 'rdf:RDF') {
-            $this->_element = $this->_element->firstChild;
-        } else {
+        $rdfTags = $this->_element->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'RDF');
+        if ($rdfTags->length != 0) {
+        	$this->_element = $rdfTags->item(0);
+        } else  {
             $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
         }
         if (!$this->_element) {