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:
@@ -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']);
|
$contact = Contact::getByURL($contact['url'], false, ['avatar', 'photo', 'xmpp', 'addr']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($contact['photo']) && !empty($contact['avatar'])) {
|
if (!empty($contact['photo']) && !empty($contact['avatar'])) {
|
||||||
// Fetch photo directly
|
// Fetch photo directly
|
||||||
$resourceid = MPhoto::ridFromURI($contact['photo']);
|
$resourceid = MPhoto::ridFromURI($contact['photo']);
|
||||||
|
|||||||
Reference in New Issue
Block a user