check array

This commit is contained in:
Mike Macgirvin 2024-06-05 07:07:04 +10:00
parent b7af1e451b
commit e8db6ad125

View file

@ -690,11 +690,11 @@ class Activity
$ret = [];
if (isset($item['attachment']) && is_array($item['attachment']) && $item['attachment']) {
$ptr = $item['attachment'];
if (!array_key_exists(0, $ptr)) {
$ptr = [$ptr];
}
$ptr = self::force_array($item['attachment']);
foreach ($ptr as $att) {
if (! is_array($att)) {
continue;
}
$entry = [];
if ($att['type'] === 'Note') {
if (array_key_exists('name', $att) && $att['name']) {