Suppress warning about undefined field
authorMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 16:04:43 +0000 (17:04 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 16:04:43 +0000 (17:04 +0100)
See #2509

wcfsetup/install/files/lib/system/form/builder/field/tag/TagFormField.class.php

index 03d603161dd1b36bece7a0d3b857df6fb47f0b9a..f5296f769f9a6b3944b6ac6be3975bd8a3f1fbf1 100644 (file)
@@ -70,8 +70,11 @@ class TagFormField extends AbstractFormField implements IObjectTypeFormField {
                }
                
                $languageIDs = [];
-               if ($object->languageID !== null) {
-                       $languageIDs[] = $object->languageID;
+               
+               /** @noinspection PhpUndefinedFieldInspection */
+               $objectLanguageId = $object->languageID;
+               if ($objectLanguageId !== null) {
+                       $languageIDs[] = $objectLanguageId;
                }
                
                $tags = TagEngine::getInstance()->getObjectTags($this->getObjectType()->objectType, $objectID, $languageIDs);