]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activitycontext.php
Fix syntax errors
[quix0rs-gnu-social.git] / lib / activitycontext.php
index 09a457924963a22d3bb3bafeaf34c67a2ce00d2a..ff3bc9411d53baeaa48b9b8d007769382bafef44 100644 (file)
@@ -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);