X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitycontext.php;h=fd0dfe06c1b7bfef81f9e82a322dc689d23f31be;hb=3b19b63babc538d7dece46fa818049c92a3eae3f;hp=09a457924963a22d3bb3bafeaf34c67a2ce00d2a;hpb=338aa4bf1d36e11a354c67796509c6d1fec2aac2;p=quix0rs-gnu-social.git diff --git a/lib/activitycontext.php b/lib/activitycontext.php index 09a4579249..fd0dfe06c1 100644 --- a/lib/activitycontext.php +++ b/lib/activitycontext.php @@ -39,6 +39,8 @@ class ActivityContext public $location; public $attention = array(); public $conversation; + public $forwardID; // deprecated, use ActivityVerb::SHARE instead + public $forwardUrl; // deprecated, use ActivityVerb::SHARE instead const THR = 'http://purl.org/syndication/thread/1.0'; const GEORSS = 'http://www.georss.org/georss'; @@ -54,8 +56,12 @@ class ActivityContext const MENTIONED = 'mentioned'; const CONVERSATION = 'ostatus:conversation'; - function __construct($element) + function __construct($element = null) { + if (empty($element)) { + return; + } + $replyToEl = ActivityUtils::child($element, self::INREPLYTO, self::THR); if (!empty($replyToEl)) { @@ -73,7 +79,6 @@ class ActivityContext $attention = array(); for ($i = 0; $i < $links->length; $i++) { - $link = $links->item($i); $linkRel = $link->getAttribute(ActivityUtils::REL);