aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-03-08 21:16:24 +0000
committerMax Kostikov <max@kostikov.co>2021-03-08 21:16:24 +0000
commit65e9ff357bc533bd1e61c66b3067d64d638d25cb (patch)
treef6740f185cb41ac80fd9b556bb305fe368c86670
parent66495e6838ed9c89968c8f33322e974fc58128db (diff)
downloadvolse-hubzilla-65e9ff357bc533bd1e61c66b3067d64d638d25cb.tar.gz
volse-hubzilla-65e9ff357bc533bd1e61c66b3067d64d638d25cb.tar.bz2
volse-hubzilla-65e9ff357bc533bd1e61c66b3067d64d638d25cb.zip
More checks on note decode
-rw-r--r--Zotlabs/Lib/Activity.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 4a2de3092..c800f331d 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2293,17 +2293,20 @@ class Activity {
$s['iconfig'] = $a;
}
- if ($act->obj['type'] === 'Note' && $s['attach']) {
- $s['body'] .= self::bb_attach($s['attach'], $s['body']);
- }
-
- if ($act->obj['type'] === 'Question' && in_array($act->type, ['Create', 'Update'])) {
- if ($act->obj['endTime']) {
- $s['comments_closed'] = datetime_convert('UTC', 'UTC', $act->obj['endTime']);
+ if (array_key_exists('type', $act->obj)) {
+
+ if ($act->obj['type'] === 'Note' && $s['attach']) {
+ $s['body'] .= self::bb_attach($s['attach'], $s['body']);
+ }
+
+ if ($act->obj['type'] === 'Question' && in_array($act->type, ['Create', 'Update'])) {
+ if (array_key_exists('endTime', $act->obj)) {
+ $s['comments_closed'] = datetime_convert('UTC', 'UTC', $act->obj['endTime']);
+ }
}
}
- if ($act->obj['closed']) {
+ if (array_key_exists('closed', $act->obj)) {
$s['comments_closed'] = datetime_convert('UTC', 'UTC', $act->obj['closed']);
}