From: Andrew Dolgov Date: Wed, 10 Jul 2013 08:50:42 +0000 (+0400) Subject: catch warning when removing source element X-Git-Tag: 1.9~66 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0156128702a7477c6a2f725fa6bf24c66952aa48;p=tt-rss.git catch warning when removing source element --- diff --git a/classes/feeditem/common.php b/classes/feeditem/common.php index f8fd3c62..58065b19 100644 --- a/classes/feeditem/common.php +++ b/classes/feeditem/common.php @@ -9,11 +9,16 @@ abstract class FeedItem_Common extends FeedItem { $this->xpath = $xpath; $this->doc = $doc; - $source = $elem->getElementsByTagName("source")->item(0); + try { - // we don't need element - if ($source) - $elem->removeChild($source); + $source = $elem->getElementsByTagName("source")->item(0); + + // we don't need element + if ($source) + $elem->removeChild($source); + } catch (DOMException $e) { + // + } } function get_author() {