diff options
| author | karl <noreply@maennchen1.de> | 2023-02-02 15:00:21 +0000 |
|---|---|---|
| committer | karl <noreply@maennchen1.de> | 2023-02-02 15:00:21 +0000 |
| commit | 18cef9cfe4135488a241df676a2902f9c6024e8e (patch) | |
| tree | 802a69e4876a737afb5d1330e310c40881710c29 | |
| parent | 512c9c7dad71f3f36969ea13ef45b49106412c5b (diff) | |
- Feature: PHP 8.2 Kompatibilität verbessert
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8226 0d5edaf7-2b12-4e95-93f4-047927463d4b
| -rw-r--r-- | views/produkt/index.phtml | 18 |
1 files 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);
|
