From cbf2e7cfea6c4360f9cc9037b242f2508964ccac Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 21 May 2010 10:18:13 -0700 Subject: Avoid PHP notice about undefined array index when no avatar photo available from Google profile --- plugins/OStatus/lib/discoveryhints.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; } -- cgit v1.2.3