aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-03-08 20:13:08 +0000
committerMax Kostikov <max@kostikov.co>2021-03-08 20:13:08 +0000
commit88b63534653d3d3da3de6cc1c6db26efddbdd7fb (patch)
tree584035e55c3574cd2b9a0875f690ed4d2ae22abe /Zotlabs/Lib
parent4afddabe15b03115e744e83e39da863035bc6d5a (diff)
downloadvolse-hubzilla-88b63534653d3d3da3de6cc1c6db26efddbdd7fb.tar.gz
volse-hubzilla-88b63534653d3d3da3de6cc1c6db26efddbdd7fb.tar.bz2
volse-hubzilla-88b63534653d3d3da3de6cc1c6db26efddbdd7fb.zip
More checks on attachments decode
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index de8f881d0..1afd2780d 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -701,13 +701,13 @@ class Activity {
if (array_key_exists('attachment', $item) && is_array($item['attachment'])) {
foreach ($item['attachment'] as $att) {
$entry = [];
- if ($att['href'])
+ if (array_key_exists('href', $att))
$entry['href'] = $att['href'];
- elseif ($att['url'])
+ elseif (array_key_exists('url', $att))
$entry['href'] = $att['url'];
- if ($att['mediaType'])
+ if (array_key_exists('mediaType', $att))
$entry['type'] = $att['mediaType'];
- elseif ($att['type'] === 'Image')
+ elseif (array_key_exists('type', $att) && $att['type'] === 'Image')
$entry['type'] = 'image/jpeg';
if ($entry)
$ret[] = $entry;