From: Matthias Schmidt Date: Sat, 7 Jul 2018 15:26:03 +0000 (+0200) Subject: Ignore invalid PIP field values when `objectProperty` is used X-Git-Tag: 5.2.0_Alpha_1~704 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fa7d22e431d4d08b5cf835dea24bbfe708454da;p=GitHub%2FWoltLab%2FWCF.git Ignore invalid PIP field values when `objectProperty` is used See #2545 --- diff --git a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php index 6ef09a2e2b..6e0ed9f4e1 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php @@ -344,8 +344,16 @@ XML; else if ($node->getObjectProperty() !== $node->getId()) { $key = $node->getObjectProperty(); - if (isset($data[$key])) { - $node->value($data[$key]); + try { + if (isset($data[$key])) { + $node->value($data[$key]); + } + } + catch (\InvalidArgumentException $e) { + // ignore invalid argument exceptions for fields with object property + // as there might be multiple fields with the same object property but + // different possible values (for example when using single selection + // form fields to set the parent element) } } }