Avoid PHP notice about undefined array index when no avatar photo available from Google profile

This commit is contained in:
Brion Vibber 2010-05-21 10:18:13 -07:00
parent 2c12d837c6
commit cbf2e7cfea
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}