From: Matthias Schmidt Date: Wed, 13 Feb 2019 17:46:55 +0000 (+0100) Subject: Fix saving non-system box via PIP GUI X-Git-Tag: 5.2.0_Alpha_1~292 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4735a807f65c26ec4ba7afb8cf083dad48a8a13;p=GitHub%2FWoltLab%2FWCF.git Fix saving non-system box via PIP GUI See #2545 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php index 6a97e99759..6b1b4e6e35 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php @@ -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'])) {