aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-06-04 09:05:34 +0000
committerMario <mario@mariovavti.com>2024-06-04 09:05:34 +0000
commita4d63ab9a35a3e3c5e128e266e5ddc3c2c6d2e8e (patch)
tree41dcfcfa2091da20151793f4af6a416716a1c23b /Zotlabs/Lib/Activity.php
parent9d56bb952e162dddd24d3bcdc50b2957ef0e0b97 (diff)
downloadvolse-hubzilla-a4d63ab9a35a3e3c5e128e266e5ddc3c2c6d2e8e.tar.gz
volse-hubzilla-a4d63ab9a35a3e3c5e128e266e5ddc3c2c6d2e8e.tar.bz2
volse-hubzilla-a4d63ab9a35a3e3c5e128e266e5ddc3c2c6d2e8e.zip
hotfix to mitigate queueworker crash
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index b819ef0f7..b628221fb 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -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;
}