Merge pull request #12147 from annando/warning

Fix warning:  Undefined array key "public"
This commit is contained in:
Philipp 2022-11-09 09:25:01 +01:00 committed by GitHub
commit 55365aa4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -40,11 +40,12 @@ class Relationship extends BaseFactory
$cdata = Contact::getPublicAndUserContactID($contactId, $uid);
if (!empty($cdata)) {
$cid = $cdata['user'];
$pcid = $cdata['public'];
} else {
$cid = $contactId;
$pcid = $cid = $contactId;
}
return new RelationshipEntity($cdata['public'], Contact::getById($cid),
return new RelationshipEntity($pcid, Contact::getById($cid),
Contact\User::isBlocked($cid, $uid), Contact\User::isIgnored($cid, $uid));
}
}

View File

@ -67,7 +67,7 @@ class CheckRelMeProfileLink
Logger::notice('Empty body of the fetched homepage link). Cannot verify the relation to profile of UID %s.', ['uid' => $uid, 'owner homepage' => $owner['homepage']]);
} else {
$doc = new DOMDocument();
$doc->loadHTML($content);
@$doc->loadHTML($content);
if (!$doc) {
Logger::notice('Could not parse the content');
} else {