diff options
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index b819ef0f7..9178dac39 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -70,7 +70,7 @@ class Activity { } if ($items) { - return self::encode_item(array_shift($items), true); + return self::encode_item(array_shift($items)); } return null; @@ -762,7 +762,12 @@ class Activity { $ptr = [$ptr]; } foreach ($ptr as $att) { + if (!is_array($att)) { + continue; + } + $entry = []; + if (array_key_exists('href', $att) && $att['href']) { $entry['href'] = $att['href']; } elseif (array_key_exists('url', $att) && $att['url']) { @@ -1085,12 +1090,16 @@ class Activity { static function encode_person($p, $extended = true) { + $ret = (($extended) ? [] : ''); + + if (!is_array($p)) { + return $ret; + } + $c = ((array_key_exists('channel_id', $p)) ? $p : channelx_by_hash($p['xchan_hash'])); $id = (($c) ? channel_url($c) : ((filter_var($p['xchan_hash'], FILTER_VALIDATE_URL)) ? $p['xchan_hash'] : $p['xchan_url'])); - $ret = (($extended) ? [] : ''); - if (!$id) { return $ret; } @@ -1866,7 +1875,7 @@ class Activity { } if ($icon) { - Master::Summon(['Xchan_photo', bin2hex($icon), bin2hex($url)]); + Master::Summon(['Xchan_photo', bin2hex($icon), bin2hex($url), $force]); } } @@ -2893,7 +2902,7 @@ class Activity { if (intval($parent[0]['item_private'])) { if (!intval($item['item_private'])) { - $item['item_private'] = intval($parent_item['item_private']); + $item['item_private'] = intval($parent[0]['item_private']); $item['allow_cid'] = '<' . $channel['channel_hash'] . '>'; $item['allow_gid'] = $item['deny_cid'] = $item['deny_gid'] = ''; } |