From 882fab9c7c7e3ad3c21883479137387a1623e390 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 8 Apr 2015 15:51:54 +0200 Subject: [PATCH] Fixed handling of empty selection for allowed BBCodes --- .../group/BBCodeSelectUserGroupOptionType.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php b/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php index ab6a25d2d0..947924d56a 100644 --- a/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php @@ -126,6 +126,18 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse * @see \wcf\system\option\IOptionType::compare() */ public function compare($value1, $value2) { + // handle special case where no allowed BBCodes have been set + if (empty($value1)) { + if (empty($value2)) { + return 0; + } + + return -1; + } + else if (empty($value2)) { + return 1; + } + $value1 = explode(',', $value1); $value2 = explode(',', $value2); -- 2.20.1