accept null constructor for ActivityContext

This commit is contained in:
Evan Prodromou 2010-09-13 16:23:10 -04:00
parent 9771a7193f
commit d207f19d22

View File

@ -54,8 +54,12 @@ class ActivityContext
const MENTIONED = 'mentioned'; const MENTIONED = 'mentioned';
const CONVERSATION = 'ostatus:conversation'; const CONVERSATION = 'ostatus:conversation';
function __construct($element) function __construct($element = null)
{ {
if (empty($element)) {
return;
}
$replyToEl = ActivityUtils::child($element, self::INREPLYTO, self::THR); $replyToEl = ActivityUtils::child($element, self::INREPLYTO, self::THR);
if (!empty($replyToEl)) { if (!empty($replyToEl)) {