Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.7.5
-
Fix Version/s: None
-
Component/s: Zend_Feed
-
Labels:None
Description
code to reproduce:
$f = Zend_Feed::import('http://www.laut.de/partner/allgemein/news.rdf'); var_dump($f->title()); echo $f->getDom()->tagName;
actual output:
null
rdf:RDF
expected output:
channel
laut.de - news
This patch solves the problem, all unit tests still pass.
--- library/Zend/Feed/Rss.php (revision 14152)
+++ library/Zend/Feed/Rss.php (working copy)
@@ -80,11 +80,8 @@
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 {
- $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
- }
+ $this->_element = $this->_element->getElementsByTagName('channel')->item(0);
+
if (!$this->_element) {
/**
* @see Zend_Feed_Exception
Someone who knows where this is needed should fix the problem.
Ok, my patch is obviously wrong - as feed elements don't work anymore with it
so the only issue is that $feed->title() isn't working properly.