summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-21 10:18:13 -0700
committerBrion Vibber <brion@pobox.com>2010-05-21 10:18:13 -0700
commitcbf2e7cfea6c4360f9cc9037b242f2508964ccac (patch)
treeccd472e6712da0b67f8444d5f3d06fde18506bcf
parent2c12d837c693a816541d32dd044de5277a46336d (diff)
Avoid PHP notice about undefined array index when no avatar photo available from Google profile
-rw-r--r--plugins/OStatus/lib/discoveryhints.php2
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];
}