[COMPONENT][Posting] Fix error around mentions of actors that don't exist
This commit is contained in:
parent
b84315c95b
commit
72a19d7eac
@ -267,7 +267,7 @@ class Posting extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
$mentioned = [];
|
$mentioned = [];
|
||||||
foreach (F\unique(F\flat_map($mentions, fn (array $m) => $m['mentioned'] ?? []), fn (Actor $a) => $a->getId()) as $m) {
|
foreach (F\unique(F\flat_map($mentions, fn (array $m) => $m['mentioned'] ?? []), fn (Actor|null $a) => $a?->getId()) as $m) {
|
||||||
if (!\is_null($m)) {
|
if (!\is_null($m)) {
|
||||||
$mentioned[] = $m->getId();
|
$mentioned[] = $m->getId();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user