catch warning when removing source element
This commit is contained in:
parent
cf1cd5a0e9
commit
0156128702
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue