Skip to content

Commit 7f4fc55

Browse files
Merge pull request #6365 from christianbeeznest/ofaj-22699
Internal: Fix post display error when userReceiver is missing in social network - refs BT#22699
2 parents ac7306c + 37c7fb0 commit 7f4fc55

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

assets/vue/components/social/SocialWallPost.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/>
1414

1515
<div class="flex flex-col">
16-
<div v-if="null === post.userReceiver || post.sender['@id'] === post.userReceiver['@id']">
16+
<div v-if="!post.userReceiver || post.sender['@id'] === post.userReceiver?.['@id']">
1717
<BaseAppLink :to="{ name: 'SocialWall', query: { id: post.sender['@id'] } }">
1818
{{ post.sender.fullName }}
1919
</BaseAppLink>

src/CoreBundle/Controller/SocialController.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,13 @@ private function getExtraFieldBlock(
552552
ExtraField::USER_FIELD_TYPE
553553
);
554554
if (!empty($extraFieldOptions)) {
555-
$optionTexts = array_map(
556-
fn (ExtraFieldOptions $option) => $option['display_text'],
557-
$extraFieldOptions
555+
$fieldValue = implode(
556+
', ',
557+
array_map(
558+
fn (ExtraFieldOptions $opt) => $opt->getDisplayText(),
559+
$extraFieldOptions
560+
)
558561
);
559-
$fieldValue = implode(', ', $optionTexts);
560-
$fieldValue = $extraFieldOptions->getDisplayText();
561562
}
562563

563564
break;

0 commit comments

Comments
 (0)