]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Avoid PHP notice about undefined array index when no avatar photo available from...
authorBrion Vibber <brion@pobox.com>
Fri, 21 May 2010 17:18:13 +0000 (10:18 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 21 May 2010 17:18:13 +0000 (10:18 -0700)
plugins/OStatus/lib/discoveryhints.php

index ca54a0f5f5547079a551efe9e97e40a34ee15729..34c9be277745be7221a64bcda71d49a8f929027d 100644 (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];
         }