forked from GNUsocial/gnu-social
Avoid PHP notice about undefined array index when no avatar photo available from Google profile
This commit is contained in:
parent
2c12d837c6
commit
cbf2e7cfea
@ -84,7 +84,7 @@ class DiscoveryHints {
|
||||
$hints['fullname'] = implode(' ', $hcard['n']);
|
||||
}
|
||||
|
||||
if (array_key_exists('photo', $hcard)) {
|
||||
if (array_key_exists('photo', $hcard) && count($hcard['photo'])) {
|
||||
$hints['avatar'] = $hcard['photo'][0];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user