From 6f88a4918ec56a8b184c149d6e4fce93e59fcf2f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 12 Jul 2013 22:43:27 +0200 Subject: [PATCH] Fixed infinite inverse integer --- .../InfiniteInverseIntegerUserGroupOptionType.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/option/user/group/InfiniteInverseIntegerUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/InfiniteInverseIntegerUserGroupOptionType.class.php index f1d4c1ae2e..1a39faaa55 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/InfiniteInverseIntegerUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/InfiniteInverseIntegerUserGroupOptionType.class.php @@ -19,10 +19,14 @@ class InfiniteInverseIntegerUserGroupOptionType extends InverseIntegerUserGroupO * @see wcf\system\option\user\group\IUserGroupOptionType::merge() */ public function merge($defaultValue, $groupValue) { - if (($defaultValue == -1 && $groupValue == -1) || ($defaultValue == $groupValue)) { + if ($groupValue == -1 || $defaultValue == $groupValue) { return null; } + if ($defaultValue == -1) { + return $groupValue; + } + return min($defaultValue, $groupValue); } } -- 2.20.1