fixing php warning

This commit is contained in:
Antoine M 2024-01-18 15:45:47 +01:00
parent f4f745aade
commit 0ab6a1fbd8

View File

@ -14,7 +14,7 @@ $thematiqueColorSlug = $mainThematique->slug;
<?php <?php
$currentPage = get_post(); $currentPage = get_post();
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null; $parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
$grandParentPage = $parentPage->post_parent ? get_post($parentPage->post_parent) : null; $grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
?> ?>
<ol> <ol>