summaryrefslogtreecommitdiff
path: root/lib/activity.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/activity.php')
-rw-r--r--lib/activity.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/activity.php b/lib/activity.php
index 7334239ec..2cb80f9e1 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -1064,6 +1064,18 @@ class Activity
}
$this->entry = $entry;
+
+ // @fixme Don't send in a DOMDocument
+ if ($feed instanceof DOMDocument) {
+ common_log(
+ LOG_WARNING,
+ 'Activity::__construct() - '
+ . 'DOMDocument passed in for feed by mistake. '
+ . "Expecting a 'feed' DOMElement."
+ );
+ $feed = $feed->getElementsByTagName('feed')->item(0);
+ }
+
$this->feed = $feed;
$pubEl = $this->_child($entry, self::PUBLISHED, self::ATOM);