]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/discoveryhints.php
Avoid PHP notice about undefined array index when no avatar photo available from...
[quix0rs-gnu-social.git] / 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];
         }