From e21912d2cad000ffbdbf3143e93b58a17101b314 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 29 Nov 2023 19:26:39 +0100 Subject: [PATCH] fixing bug when no post id in homegrade_brochure_post_title_updater --- includes/post-brochures.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/post-brochures.php b/includes/post-brochures.php index 9d48bec..7f0ee91 100644 --- a/includes/post-brochures.php +++ b/includes/post-brochures.php @@ -5,8 +5,9 @@ function homegrade_brochure_post_title_updater($post_id) $my_post = array(); $my_post['ID'] = $post_id; + if (!$post_id) return - $brochureTaxonomy = get_the_terms($post_id, 'thematiques')[0]; + $brochureTaxonomy = get_the_terms($post_id, 'thematiques')[0]; // write_log($brochureTaxonomy);