Avoid warning/notice spew in XRD parser. Not all DOM nodes are elements.

This commit is contained in:
Brion Vibber 2010-03-03 09:31:14 -08:00
parent f7ba5566bc
commit ffa1931c9d

View File

@ -149,11 +149,13 @@ class XRD
$link['href'] = $element->getAttribute('href');
$link['template'] = $element->getAttribute('template');
foreach ($element->childNodes as $node) {
if ($node instanceof DOMElement) {
switch($node->tagName) {
case 'Title':
$link['title'][] = $node->nodeValue;
}
}
}
return $link;
}