From 05ac1cd8bda7076053b7d518e47cd78cb7b569e5 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 12 May 2019 18:26:49 +0200 Subject: [PATCH] Ignore invalid values passed to `ShowOrderFormField::value()` See #2509 --- .../system/form/builder/field/ShowOrderFormField.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php index 1bf964eeb9..703212bcf1 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php @@ -99,7 +99,9 @@ class ShowOrderFormField extends SingleSelectionFormField { } if (count($keys) <= $value) { - throw new \InvalidArgumentException("Unknown value '{$value}' as only " . count($keys) . " values are available."); + // outdated `showOrder` values might cause errors; simply ignore those + // outdated values + return $this; } return parent::value($keys[$value]); -- 2.20.1