escaping thematiqueColorSlug if null

This commit is contained in:
Antoine M 2024-05-27 15:19:57 +02:00
parent c1f9be6366
commit 3717c9e353

View File

@ -2,7 +2,7 @@
<?php
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? '';
$mainThematique = getMainThematique($currentThematique);
$thematiqueColorSlug = $mainThematique->slug;
$thematiqueColorSlug = $mainThematique->slug ?? null;
?>