]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
accept null constructor for ActivityContext
authorEvan Prodromou <evan@status.net>
Mon, 13 Sep 2010 20:23:10 +0000 (16:23 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 13 Sep 2010 20:23:10 +0000 (16:23 -0400)
lib/activitycontext.php

index 09a457924963a22d3bb3bafeaf34c67a2ce00d2a..f568c791ffd68dce490acce31c20630b21cf6b80 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)) {