From f4735a807f65c26ec4ba7afb8cf083dad48a8a13 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 13 Feb 2019 18:46:55 +0100 Subject: [PATCH] Fix saving non-system box via PIP GUI See #2545 --- .../package/plugin/BoxPackageInstallationPlugin.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'])) { -- 2.20.1