]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Properly unlink all old avatars when deleting/uploading a new
[quix0rs-gnu-social.git] / lib / util.php
index 2e9ba29ff37123461b9b1b1a0da87c37e839208c..abdd5c92070c9973b92dcdf83ab8d10f547b9e34 100644 (file)
@@ -2004,7 +2004,11 @@ function common_user_property($property)
         return $profile->$property;
         break;
     case 'avatar':
-        return $profile->getAvatar(AVATAR_STREAM_SIZE);
+        try {
+            return $profile->getAvatar(AVATAR_STREAM_SIZE);
+        } catch (Exception $e) {
+            return null;
+        }
         break;
     case 'bestname':
         return $profile->getBestName();