]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Temp fix for problem getting actor from PuSH updates where actor is only specified...
authorZach Copley <zach@status.net>
Thu, 4 Mar 2010 04:55:53 +0000 (20:55 -0800)
committerZach Copley <zach@status.net>
Thu, 4 Mar 2010 04:58:34 +0000 (20:58 -0800)
lib/activity.php

index ce14fa254607eec1e8d0a504b1bade0e22c25e59..e1bce6f190d57166187cfe4baa23126063768f81 100644 (file)
@@ -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);