From 0156128702a7477c6a2f725fa6bf24c66952aa48 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Jul 2013 12:50:42 +0400 Subject: [PATCH] catch warning when removing source element --- classes/feeditem/common.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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() { -- 2.39.5