1
0
Fork 0

Provide default host value to hash() in Model\Item::guidFromUri

- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1338133783
This commit is contained in:
Hypolite Petovan 2022-12-07 22:21:23 -05:00
commit fc246424a9
5 changed files with 14 additions and 9 deletions

View file

@ -2099,7 +2099,7 @@ class Contact
if ($static) {
$query_params['static'] = true;
}
return $url . ($guid ?: $cid) . (!empty($query_params) ? '?' . http_build_query($query_params) : '');
}
@ -2675,7 +2675,7 @@ class Contact
}
$update = false;
$guid = ($ret['guid'] ?? '') ?: Item::guidFromUri($ret['url'], parse_url($ret['url'], PHP_URL_HOST));
$guid = ($ret['guid'] ?? '') ?: Item::guidFromUri($ret['url']);
// make sure to not overwrite existing values with blank entries except some technical fields
$keep = ['batch', 'notify', 'poll', 'request', 'confirm', 'poco', 'baseurl'];