From 2ef0c53c0d2da5fa87b06cf3f239a44f32889cba Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 5 Feb 2024 11:21:23 +0100 Subject: [PATCH] Fix error in user search The error is caused by an empty radiobutton. ``` preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated ``` --- .../files/lib/system/option/RadioButtonOptionType.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php b/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php index eb88734f409..c68cf590648 100644 --- a/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/RadioButtonOptionType.class.php @@ -105,7 +105,7 @@ public function getCondition(PreparedStatementConditionBuilder &$conditions, Opt return false; } - $conditions->add("option_value.userOption" . $option->optionID . " = ?", [StringUtil::trim($value)]); + $conditions->add("option_value.userOption" . $option->optionID . " = ?", [StringUtil::trim($value ?: '')]); return true; }