aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-30 15:36:12 +0000
committerMario <mario@mariovavti.com>2021-08-30 15:36:12 +0000
commite25558e24d8758b788fec7873431492f965d694d (patch)
tree813be063252b7548ed702dd6c2f3244efcb9e55e /Zotlabs
parentada7d4eef5a6dd26a06fef1abd668332f6d0226a (diff)
downloadvolse-hubzilla-e25558e24d8758b788fec7873431492f965d694d.tar.gz
volse-hubzilla-e25558e24d8758b788fec7873431492f965d694d.tar.bz2
volse-hubzilla-e25558e24d8758b788fec7873431492f965d694d.zip
improve icon lookup
Diffstat (limited to 'Zotlabs')
-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;