$profile['poll'] = $apcontact['outbox'];
$profile['pubkey'] = $apcontact['pubkey'];
$profile['baseurl'] = $apcontact['baseurl'];
+ $profile['gsid'] = $apcontact['gsid'];
// Remove all "null" fields
foreach ($profile as $field => $content) {
$items = $data['orderedItems'];
} elseif (!empty($data['first']['orderedItems'])) {
$items = $data['first']['orderedItems'];
- } elseif (!empty($data['first'])) {
+ } elseif (!empty($data['first']) && is_string($data['first']) && ($data['first'] != $url)) {
return self::fetchItems($data['first'], $uid);
} else {
- $items = [];
+ return [];
}
- if (!empty($data['next'])) {
+ if (!empty($data['next']) && is_string($data['next'])) {
$items = array_merge($items, self::fetchItems($data['next'], $uid));
}