Avoid warning/notice spew in XRD parser. Not all DOM nodes are elements.
This commit is contained in:
parent
f7ba5566bc
commit
ffa1931c9d
|
@ -149,9 +149,11 @@ class XRD
|
||||||
$link['href'] = $element->getAttribute('href');
|
$link['href'] = $element->getAttribute('href');
|
||||||
$link['template'] = $element->getAttribute('template');
|
$link['template'] = $element->getAttribute('template');
|
||||||
foreach ($element->childNodes as $node) {
|
foreach ($element->childNodes as $node) {
|
||||||
switch($node->tagName) {
|
if ($node instanceof DOMElement) {
|
||||||
case 'Title':
|
switch($node->tagName) {
|
||||||
$link['title'][] = $node->nodeValue;
|
case 'Title':
|
||||||
|
$link['title'][] = $node->nodeValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user