From 18cef9cfe4135488a241df676a2902f9c6024e8e Mon Sep 17 00:00:00 2001 From: karl Date: Thu, 2 Feb 2023 15:00:21 +0000 Subject: - Feature: PHP 8.2 Kompatibilität verbessert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8226 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/produkt/index.phtml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/views/produkt/index.phtml b/views/produkt/index.phtml index 573d50a..9a11630 100644 --- a/views/produkt/index.phtml +++ b/views/produkt/index.phtml @@ -312,17 +312,21 @@ $post_terms = \get_the_terms($post_id, $this->get_option('wpsg_mod_produktartikel_pathkey_cat')); $arTermDisplay = []; + + if (is_array($post_terms)) { - foreach ($post_terms as $term) { - - if (!in_array($term->slug, $arTermExclude)) { - - if ($wpsg_mod_produktartikel_cat_first_level && $term->parent !== 0) continue; + foreach ($post_terms as $term) { - $arTermDisplay[] = $term->name; + if (!in_array($term->slug, $arTermExclude)) { + + if ($wpsg_mod_produktartikel_cat_first_level && $term->parent !== 0) continue; + + $arTermDisplay[] = $term->name; + + } } - + } asort($arTermDisplay); -- cgit v1.2.3