* @return array profile array
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
+ * @todo Rewrite parameter $update to avoid true|false|null (boolean is binary, null adds a third case)
*/
public static function getByURL(string $url, $update = null): array
{
return [];
}
- $fetched_contact = false;
+ $fetched_contact = [];
if (empty($update)) {
if (is_null($update)) {
if ($failed) {
self::markForArchival($fetched_contact ?: []);
- return $fetched_contact ?? [];
+ return $fetched_contact;
}
}
// Quit if none of the basic values are set
if (empty($apcontact['url']) || empty($apcontact['type']) || (($apcontact['type'] != 'Tombstone') && empty($apcontact['inbox']))) {
- return $fetched_contact ?? [];
+ return $fetched_contact;
} elseif ($apcontact['type'] == 'Tombstone') {
// The "inbox" field must have a content
$apcontact['inbox'] = '';
// Quit if this doesn't seem to be an account at all
if (!in_array($apcontact['type'], ActivityPub::ACCOUNT_TYPES)) {
- return $fetched_contact ?? [];
+ return $fetched_contact;
}
$parts = parse_url($apcontact['url']);
*
* @param string $url inbox url
* @param boolean $shared Shared Inbox
+ * @return void
*/
private static function unarchiveInbox(string $url, bool $shared)
{