Temp fix for problem getting actor from PuSH updates where actor is only specified in subject

This commit is contained in:
Zach Copley 2010-03-03 20:55:53 -08:00
parent 0e360ad23d
commit 8ffb34a90c

View File

@ -1060,6 +1060,18 @@ class Activity
} }
$this->entry = $entry; $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; $this->feed = $feed;
$pubEl = $this->_child($entry, self::PUBLISHED, self::ATOM); $pubEl = $this->_child($entry, self::PUBLISHED, self::ATOM);