summaryrefslogtreecommitdiff
path: root/lib/activitycontext.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/activitycontext.php')
-rw-r--r--lib/activitycontext.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/activitycontext.php b/lib/activitycontext.php
index 09a457924..ff3bc9411 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);