X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitycontext.php;h=ff3bc9411d53baeaa48b9b8d007769382bafef44;hb=f68d4e7d061f33cffbcf685949f3116237c23e55;hp=09a457924963a22d3bb3bafeaf34c67a2ce00d2a;hpb=08fc6053ec55e911b842fd05dafc5e0c99c4e992;p=quix0rs-gnu-social.git diff --git a/lib/activitycontext.php b/lib/activitycontext.php index 09a4579249..ff3bc9411d 100644 --- a/lib/activitycontext.php +++ b/lib/activitycontext.php @@ -54,8 +54,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 +77,6 @@ class ActivityContext $attention = array(); for ($i = 0; $i < $links->length; $i++) { - $link = $links->item($i); $linkRel = $link->getAttribute(ActivityUtils::REL);