diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-21 10:18:13 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-21 10:18:13 -0700 |
commit | cbf2e7cfea6c4360f9cc9037b242f2508964ccac (patch) | |
tree | ccd472e6712da0b67f8444d5f3d06fde18506bcf /plugins/OStatus | |
parent | 2c12d837c693a816541d32dd044de5277a46336d (diff) |
Avoid PHP notice about undefined array index when no avatar photo available from Google profile
Diffstat (limited to 'plugins/OStatus')
-rw-r--r-- | plugins/OStatus/lib/discoveryhints.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/OStatus/lib/discoveryhints.php b/plugins/OStatus/lib/discoveryhints.php index ca54a0f5f..34c9be277 100644 --- a/plugins/OStatus/lib/discoveryhints.php +++ b/plugins/OStatus/lib/discoveryhints.php @@ -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]; } |