Check unparseURL parameter type in APContact::getByURL

- Address https://github.com/friendica/friendica/issues/10167#issuecomment-832421258
This commit is contained in:
Hypolite Petovan 2021-05-10 21:52:26 -04:00
parent 9ef9fc7c14
commit 48ac619599
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ class APContact
unset($parts['path']);
if (empty($apcontact['addr'])) {
if (!empty($apcontact['nick'])) {
if (!empty($apcontact['nick']) && is_array($parts)) {
$apcontact['addr'] = $apcontact['nick'] . '@' . str_replace('//', '', Network::unparseURL($parts));
} else {
$apcontact['addr'] = '';