From: Alexander Ebert Date: Fri, 12 Jul 2013 20:43:27 +0000 (+0200) Subject: Fixed infinite inverse integer X-Git-Tag: 2.0.0_Beta_5~56^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f88a4918ec56a8b184c149d6e4fce93e59fcf2f;p=GitHub%2FWoltLab%2FWCF.git Fixed infinite inverse integer --- 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); } }