forked from GNUsocial/gnu-social
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['template'] = $element->getAttribute('template');
|
||||
foreach ($element->childNodes as $node) {
|
||||
switch($node->tagName) {
|
||||
case 'Title':
|
||||
$link['title'][] = $node->nodeValue;
|
||||
if ($node instanceof DOMElement) {
|
||||
switch($node->tagName) {
|
||||
case 'Title':
|
||||
$link['title'][] = $node->nodeValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user