Fix saving non-system box via PIP GUI
authorMatthias Schmidt <gravatronics@live.com>
Wed, 13 Feb 2019 17:46:55 +0000 (18:46 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 13 Feb 2019 17:46:55 +0000 (18:46 +0100)
See #2545

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

index 6a97e99759e6078a05415ed2f954accdf2a40538..6b1b4e6e3540ca48181516d9ae93f61b7064f340 100644 (file)
@@ -725,7 +725,12 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
                                $objectType = $data['objectType'];
                                unset($data['objectType']);
                                
-                               $data['objectTypeID'] = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.boxController', $objectType)->objectTypeID;
+                               if (!empty($objectType)) {
+                                       $data['objectTypeID'] = ObjectTypeCache::getInstance()->getObjectTypeByName(
+                                               'com.woltlab.wcf.boxController',
+                                               $objectType
+                                       )->objectTypeID;
+                               }
                        }
                        
                        if (isset($data['visibilityExceptions'])) {