$server_url = normalise_link(self::detectServer($profile));
}
- if (!in_array($gcontacts[0]["network"], [Protocol::DFRN, Protocol::DIASPORA, Protocol::FEED, Protocol::OSTATUS, ""])) {
+ if (!in_array($gcontacts[0]["network"], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::FEED, Protocol::OSTATUS, ""])) {
logger("Profile ".$profile.": Network type ".$gcontacts[0]["network"]." can't be checked", LOGGER_DEBUG);
return false;
}
if (isset($data['version'])) {
$platform = "Mastodon";
- $version = $data['version'];
- $site_name = $data['title'];
- $info = $data['description'];
+ $version = defaults($data, 'version', '');
+ $site_name = defaults($data, 'title', '');
+ $info = defaults($data, 'description', '');
$network = Protocol::OSTATUS;
}
$tags = [];
foreach ($data['tags'] as $tag) {
$tag = mb_strtolower($tag);
- if (count($tag) < 100) {
+ if (strlen($tag) < 100) {
$tags[$tag] = $tag;
}
}