Properly handle possible NULL values for option values
authorAlexander Ebert <ebert@woltlab.com>
Thu, 13 Jun 2024 11:09:26 +0000 (13:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 13 Jun 2024 11:09:26 +0000 (13:09 +0200)
See https://www.woltlab.com/community/thread/306690-explode-passing-null-to-parameter-2-string-of-type-string-is-deprecated/

wcfsetup/install/files/lib/system/option/user/group/BBCodeSelectUserGroupOptionType.class.php

index 66487a7b091a730a0ceaa0f6020440963d51c806..ab68bc62ac54b6048c4032b9e87925ec61ec9dc3 100644 (file)
@@ -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');