summaryrefslogtreecommitdiff
path: root/classes/feeditem
diff options
context:
space:
mode:
Diffstat (limited to 'classes/feeditem')
-rw-r--r--classes/feeditem/atom.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php
index ee5591757..8c3e0f8a7 100644
--- a/classes/feeditem/atom.php
+++ b/classes/feeditem/atom.php
@@ -205,7 +205,11 @@ class FeedItem_Atom extends FeedItem_Common {
return $lang;
} else {
// Fall back to the language declared on the feed, if any.
- return $this->doc->firstChild->getAttributeNS(self::NS_XML, "lang");
+ foreach ($this->doc->childNodes as $child) {
+ if (method_exists($child, "getAttributeNS")) {
+ return $child->getAttributeNS(self::NS_XML, "lang");
+ }
+ }
}
}
}