aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-03-08 19:40:40 +0000
committerMax Kostikov <max@kostikov.co>2021-03-08 19:40:40 +0000
commitc2adf1dcd16c6bb71798141212e80310adf5a03d (patch)
tree78f15676b90824a3aba7c809291fe2185c6960d8 /Zotlabs
parente4512842561cf1a6b6e482085c27a77aac20b59a (diff)
downloadvolse-hubzilla-c2adf1dcd16c6bb71798141212e80310adf5a03d.tar.gz
volse-hubzilla-c2adf1dcd16c6bb71798141212e80310adf5a03d.tar.bz2
volse-hubzilla-c2adf1dcd16c6bb71798141212e80310adf5a03d.zip
Check if 'attach' and 'iconfig' array are defined
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index f8f312c7c..8df76b5bf 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -641,7 +641,7 @@ class Activity {
$ret = [];
- if ($item['attach']) {
+ if (array_key_exists('attach', $item)) {
$atts = ((is_array($item['attach'])) ? $item['attach'] : json_decode($item['attach'], true));
if ($atts) {
foreach ($atts as $att) {
@@ -654,7 +654,7 @@ class Activity {
}
}
}
- if ($item['iconfig']) {
+ if (array_key_exists('iconfig', $item) && is_array($item['iconfig'])) {
foreach ($item['iconfig'] as $att) {
if ($att['sharing']) {
$value = ((is_string($att['v']) && preg_match('|^a:[0-9]+:{.*}$|s', $att['v'])) ? unserialize($att['v']) : $att['v']);