From 3fbcba40a694fe89fa31fa30c77ecdda2f5ec4cc Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 25 Aug 2011 11:37:15 -0400 Subject: [PATCH] Don't show large image if it's not available --- lib/activityobject.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/activityobject.php b/lib/activityobject.php index 228473d518..0343fa664e 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -699,7 +699,7 @@ class ActivityObject // XXX: Not sure what the best avatar is to use for the // author's "image". For now, I'm using the large size. - $avatarLarge = null; + $imgLink = null; $avatarMediaLinks = array(); foreach ($this->avatarLinks as $a) { @@ -724,7 +724,9 @@ class ActivityObject $object['avatarLinks'] = $avatarMediaLinks; // extension // image - $object['image'] = $imgLink->asArray(); + if (!empty($imgLink)) { + $object['image'] = $imgLink->asArray(); + } } // objectType -- 2.39.5