From cf59f0d0efee4e52d154cbfc0132d203c088d6c2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 1 Aug 2024 11:55:52 +0200 Subject: [PATCH] Fix missing setting of the default value if it was "0" --- wcfsetup/install/files/lib/data/user/UserEditor.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserEditor.class.php b/wcfsetup/install/files/lib/data/user/UserEditor.class.php index 36c19598ec..ef81052a58 100644 --- a/wcfsetup/install/files/lib/data/user/UserEditor.class.php +++ b/wcfsetup/install/files/lib/data/user/UserEditor.class.php @@ -125,13 +125,12 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject self::$userOptionDefaultValues = []; $sql = "SELECT optionID, defaultValue - FROM wcf" . WCF_N . "_user_option"; + FROM wcf" . WCF_N . "_user_option + WHERE defaultValue IS NOT NULL"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(); while ($row = $statement->fetchArray()) { - if (!empty($row['defaultValue'])) { - self::$userOptionDefaultValues[$row['optionID']] = $row['defaultValue']; - } + self::$userOptionDefaultValues[$row['optionID']] = $row['defaultValue']; } } -- 2.20.1