diff options
author | Mario <mario@mariovavti.com> | 2023-05-10 18:38:43 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-05-10 18:38:43 +0000 |
commit | 01f8cb698d9e94f442ae4aa53b92127bb088c458 (patch) | |
tree | 562defb2f28226c02af4393558c3afa717305753 /Zotlabs/Lib/Activity.php | |
parent | 5e4d0f45fc04a0e0fad698b4590f68de8145ce63 (diff) | |
download | volse-hubzilla-01f8cb698d9e94f442ae4aa53b92127bb088c458.tar.gz volse-hubzilla-01f8cb698d9e94f442ae4aa53b92127bb088c458.tar.bz2 volse-hubzilla-01f8cb698d9e94f442ae4aa53b92127bb088c458.zip |
check if we have a type and a href
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 4 |
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']]; } |