Check the existence of the uid
field before accessing it in Module\Photo
- Address https://github.com/friendica/friendica/issues/11218#issuecomment-1039512291
This commit is contained in:
parent
361fdccdc7
commit
3b6c40e2e6
1 changed files with 2 additions and 1 deletions
|
@ -288,9 +288,10 @@ class Photo extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
If (($contact['uid'] != 0) && empty($contact['photo']) && empty($contact['avatar'])) {
|
||||
if (!empty($contact['uid']) && empty($contact['photo']) && empty($contact['avatar'])) {
|
||||
$contact = Contact::getByURL($contact['url'], false, ['avatar', 'photo', 'xmpp', 'addr']);
|
||||
}
|
||||
|
||||
if (!empty($contact['photo']) && !empty($contact['avatar'])) {
|
||||
// Fetch photo directly
|
||||
$resourceid = MPhoto::ridFromURI($contact['photo']);
|
||||
|
|
Loading…
Reference in a new issue