1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 10:05:58 +00:00

catch warning when removing source element

This commit is contained in:
Andrew Dolgov
2013-07-10 12:50:42 +04:00
parent cf1cd5a0e9
commit 0156128702

View File

@@ -9,11 +9,16 @@ abstract class FeedItem_Common extends FeedItem {
$this->xpath = $xpath; $this->xpath = $xpath;
$this->doc = $doc; $this->doc = $doc;
$source = $elem->getElementsByTagName("source")->item(0); try {
// we don't need <source> element $source = $elem->getElementsByTagName("source")->item(0);
if ($source)
$elem->removeChild($source); // we don't need <source> element
if ($source)
$elem->removeChild($source);
} catch (DOMException $e) {
//
}
} }
function get_author() { function get_author() {