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
1 changed files with 9 additions and 4 deletions

View File

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