mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
check array
This commit is contained in:
parent
b7af1e451b
commit
e8db6ad125
1 changed files with 4 additions and 4 deletions
|
@ -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']) {
|
||||
|
|
Loading…
Reference in a new issue