From: Tim Düsterhus Date: Wed, 3 Feb 2021 10:03:20 +0000 (+0100) Subject: Add explicit parentheses around mixed boolean operators in BooleanUserGroupOptionType X-Git-Tag: 5.4.0_Alpha_1~319 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=61074d394f77f8123a3f676a1d804c30e04df7e3;p=GitHub%2FWoltLab%2FWCF.git Add explicit parentheses around mixed boolean operators in BooleanUserGroupOptionType see #3926 --- diff --git a/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php index e521d598a2..eb9d5e5445 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/BooleanUserGroupOptionType.class.php @@ -57,7 +57,7 @@ class BooleanUserGroupOptionType extends BooleanOptionType implements IUserGroup } // don't save if values are equal or $defaultValue is better - if ($defaultValue == $groupValue || $defaultValue && !$groupValue) { + if ($defaultValue == $groupValue || ($defaultValue && !$groupValue)) { return; }