Fix searching language category in language file via GUI
authorMatthias Schmidt <gravatronics@live.com>
Wed, 17 Oct 2018 17:28:22 +0000 (19:28 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 17 Oct 2018 17:28:22 +0000 (19:28 +0200)
See #2545

wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php

index 21552c0d358203460fbe8ab7e210a73d1a874d04..7f6c809ac5c11f2cbe9263e50ef1068059ef0df8 100644 (file)
@@ -772,7 +772,7 @@ XML;
                
                /** @var \DOMElement $languageCategory */
                foreach ($document->documentElement->childNodes as $languageCategory) {
-                       if ($languageCategory->getAttribute('name') === $languageCategoryName) {
+                       if ($languageCategory instanceof \DOMElement && $languageCategory->getAttribute('name') === $languageCategoryName) {
                                $languageCategory->appendChild($languageItem);
                                break;
                        }