diff --git a/lib/activitystreamjsondocument.php b/lib/activitystreamjsondocument.php index 12c3882c25..11b4e51ec8 100644 --- a/lib/activitystreamjsondocument.php +++ b/lib/activitystreamjsondocument.php @@ -27,10 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) -{ - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * A class for generating JSON documents that represent an Activity Streams @@ -72,7 +69,7 @@ class ActivityStreamJSONDocument extends JSONActivityCollection * @param User $cur the current authenticated user */ - function __construct($cur = null, $title = null, $items = null, $links = null, $url = null) + function __construct($cur = null, $title = null, array $items=[], $links = null, $url = null) { parent::__construct($items, $url); diff --git a/lib/jsonactivitycollection.php b/lib/jsonactivitycollection.php index 1d1b482e04..1e4f181ffa 100644 --- a/lib/jsonactivitycollection.php +++ b/lib/jsonactivitycollection.php @@ -1,4 +1,5 @@ items = empty($items) ? array() : $items; $this->totalItems = count($items);