summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/activity.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/activity.php b/lib/activity.php
index ce14fa254..e1bce6f19 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -1060,6 +1060,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);