catch warning when removing source element
This commit is contained in:
parent
cf1cd5a0e9
commit
0156128702
1 changed files with 9 additions and 4 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue