summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-03 09:31:14 -0800
committerBrion Vibber <brion@pobox.com>2010-03-03 09:31:14 -0800
commitffa1931c9dafea385e8f30c53ea079e2425a0786 (patch)
treef557a74a2a09357368477b99e691e02580164e04 /plugins/OStatus
parentf7ba5566bc1e2bad262b948c92d8167e27e147bc (diff)
Avoid warning/notice spew in XRD parser. Not all DOM nodes are elements.
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/lib/xrd.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/OStatus/lib/xrd.php b/plugins/OStatus/lib/xrd.php
index 85df26c54..f00e1f809 100644
--- a/plugins/OStatus/lib/xrd.php
+++ b/plugins/OStatus/lib/xrd.php
@@ -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;
+ }
}
}