aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 0cc071c61..3e0b067d9 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1556,13 +1556,21 @@ class Activity {
$icon = z_root() . '/' . get_default_profile_photo(300);
if ($person_obj['icon']) {
if (is_array($person_obj['icon'])) {
- if (array_key_exists('url', $person_obj['icon']))
+ if (array_key_exists('url', $person_obj['icon'])) {
$icon = $person_obj['icon']['url'];
- else
- $icon = $person_obj['icon'][0]['url'];
+ }
+ else {
+ if (is_string($person_obj['icon'][0])) {
+ $icon = $person_obj['icon'][0];
+ }
+ elseif (array_key_exists('url', $person_obj['icon'][0])) {
+ $icon = $person_obj['icon'][0]['url'];
+ }
+ }
}
- else
+ else {
$icon = $person_obj['icon'];
+ }
}
$links = false;