From: Marcel Werk Date: Mon, 5 Feb 2024 10:21:23 +0000 (+0100) Subject: Fix error in user search X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a8be7a820d36b8c699fa1eddc0f872f8ccb3bc1;p=GitHub%2FWoltLab%2FWCF.git 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 ``` --- 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; }