From: Matthias Schmidt Date: Sun, 12 May 2019 16:26:49 +0000 (+0200) Subject: Ignore invalid values passed to `ShowOrderFormField::value()` X-Git-Tag: 5.2.0_Alpha_1~91 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05ac1cd8bda7076053b7d518e47cd78cb7b569e5;p=GitHub%2FWoltLab%2FWCF.git Ignore invalid values passed to `ShowOrderFormField::value()` See #2509 --- 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]);