fixing postDescripption ternary when unefined value

This commit is contained in:
Antoine M 2024-10-02 09:51:50 +02:00
parent 43d5b67108
commit 7c5a401580
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ $mainThematique = getMainThematique($thematique);
$thematiqueColorSlug = $mainThematique->slug;
$thematique_icon = get_field('taxonomy_pictures', 'thematiques' . '_' . $mainThematique->term_id)['icon'];
$postDescription = $attributes['postDescription'];
$postDescription = $attributes['postDescription'] ?? null;
$coverUrl = $postType->name === 'videos-webinaires' && $postThumbnail ? $postThumbnail : ($thematique_icon ? $thematique_icon['url'] : null);

View File

@ -12,7 +12,7 @@ $mainThematique = getMainThematique($thematique);
$thematiqueColorSlug = $mainThematique->slug;
$thematique_icon = get_field('taxonomy_pictures', 'thematiques' . '_' . $mainThematique->term_id)['icon'];
$postDescription = $attributes['postDescription'];
$postDescription = $attributes['postDescription'] ?? null;
$coverUrl = $postType->name === 'videos-webinaires' && $postThumbnail ? $postThumbnail : ($thematique_icon ? $thematique_icon['url'] : null);