From 2fa7d22e431d4d08b5cf835dea24bbfe708454da Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 7 Jul 2018 17:26:03 +0200 Subject: [PATCH] Ignore invalid PIP field values when `objectProperty` is used See #2545 --- .../pip/TXmlGuiPackageInstallationPlugin.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) } } } -- 2.20.1