aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-10 18:38:43 +0000
committerMario <mario@mariovavti.com>2023-05-10 18:38:43 +0000
commit01f8cb698d9e94f442ae4aa53b92127bb088c458 (patch)
tree562defb2f28226c02af4393558c3afa717305753
parent5e4d0f45fc04a0e0fad698b4590f68de8145ce63 (diff)
downloadvolse-hubzilla-01f8cb698d9e94f442ae4aa53b92127bb088c458.tar.gz
volse-hubzilla-01f8cb698d9e94f442ae4aa53b92127bb088c458.tar.bz2
volse-hubzilla-01f8cb698d9e94f442ae4aa53b92127bb088c458.zip
check if we have a type and a href
-rw-r--r--Zotlabs/Lib/Activity.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 9f957c988..81a199cb2 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -622,6 +622,10 @@ class Activity {
$atts = ((is_array($item['attach'])) ? $item['attach'] : json_decode($item['attach'], true));
if ($atts) {
foreach ($atts as $att) {
+ if (!isset($att['type'], $att['href'])) {
+ continue;
+ }
+
if (isset($att['type']) && strpos($att['type'], 'image')) {
$ret[] = ['type' => 'Image', 'url' => $att['href']];
}