From: Zach Copley Date: Thu, 4 Mar 2010 04:55:53 +0000 (-0800) Subject: Temp fix for problem getting actor from PuSH updates where actor is only specified... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8ffb34a90c78502843aabaac71963d2f40c505d8;p=quix0rs-gnu-social.git Temp fix for problem getting actor from PuSH updates where actor is only specified in subject --- diff --git a/lib/activity.php b/lib/activity.php index ce14fa2546..e1bce6f190 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);