From: Alexander Ebert Date: Thu, 13 Jun 2024 11:09:26 +0000 (+0200) Subject: Properly handle possible NULL values for option values X-Git-Tag: 6.0.15_dev_1~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3d6dec0a319f8346c4d3177059ab7fd356517f8;p=GitHub%2FWoltLab%2FWCF.git Properly handle possible NULL values for option values See https://www.woltlab.com/community/thread/306690-explode-passing-null-to-parameter-2-string-of-type-string-is-deprecated/ --- 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 66487a7b09..ab68bc62ac 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 @@ -74,7 +74,7 @@ class BBCodeSelectUserGroupOptionType extends AbstractOptionType implements IUse WCF::getTPL()->assign([ 'bbCodes' => $this->bbCodes, 'option' => $option, - 'selectedBBCodes' => \explode(',', $value), + 'selectedBBCodes' => \explode(',', $value ?: ''), ]); return WCF::getTPL()->fetch('bbCodeSelectOptionType');