diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Feed/Entry/Abstract.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Feed/Entry/Abstract.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,124 @@ +loadXML($element); + @ini_restore('track_errors'); + + if (!$status) { + // prevent the class to generate an undefined variable notice (ZF-2590) + if (!isset($php_errormsg)) { + if (function_exists('xdebug_is_enabled')) { + $php_errormsg = '(error message not available, when XDebug is running)'; + } else { + $php_errormsg = '(error message not available)'; + } + } + + /** + * @see Zend_Feed_Exception + */ + require_once 'Zend/Feed/Exception.php'; + throw new Zend_Feed_Exception("DOMDocument cannot parse XML: $php_errormsg"); + } + + $element = $doc->getElementsByTagName($this->_rootElement)->item(0); + if (!$element) { + /** + * @see Zend_Feed_Exception + */ + require_once 'Zend/Feed/Exception.php'; + throw new Zend_Feed_Exception('No root <' . $this->_rootElement . '> element found, cannot parse feed.'); + } + } else { + $doc = new DOMDocument('1.0', 'utf-8'); + if ($this->_rootNamespace !== null) { + $element = $doc->createElementNS(Zend_Feed::lookupNamespace($this->_rootNamespace), $this->_rootElement); + } else { + $element = $doc->createElement($this->_rootElement); + } + } + } + + parent::__construct($element); + } + +}