Merge pull request #11247 from MrPetovan/bug/notices
Check the existence of the `uid` field before accessing it in Module\Photo
This commit is contained in:
commit
18e0fb375b
|
@ -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