From 6a8be7a820d36b8c699fa1eddc0f872f8ccb3bc1 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 7fdfa9cffe..96014fc68d 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 @@ class RadioButtonOptionType extends AbstractOptionType implements return false; } - $conditions->add("option_value.userOption" . $option->optionID . " = ?", [StringUtil::trim($value)]); + $conditions->add("option_value.userOption" . $option->optionID . " = ?", [StringUtil::trim($value ?: '')]); return true; } -- 2.20.1