From: Alexander Ebert Date: Fri, 4 Aug 2023 11:16:43 +0000 (+0200) Subject: Fix the handling of `NULL` values X-Git-Tag: 6.0.0_Beta_1~14^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f312e1602dd6cace3c18da3589375ebbe410f996;p=GitHub%2FWoltLab%2FWCF.git Fix the handling of `NULL` values See https://www.woltlab.com/community/thread/300917-neue-benutzergruppe-anlegen-funktioniert-nicht-mit-php-8-1x/ --- diff --git a/wcfsetup/install/files/lib/system/option/LineBreakSeparatedTextOptionType.class.php b/wcfsetup/install/files/lib/system/option/LineBreakSeparatedTextOptionType.class.php index 2144c49ae4..b6d71658e5 100644 --- a/wcfsetup/install/files/lib/system/option/LineBreakSeparatedTextOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/LineBreakSeparatedTextOptionType.class.php @@ -23,7 +23,7 @@ class LineBreakSeparatedTextOptionType extends TextareaOptionType */ public function getFormElement(Option $option, $value) { - $values = ArrayUtil::trim(\explode("\n", StringUtil::unifyNewlines($value))); + $values = ArrayUtil::trim(\explode("\n", StringUtil::unifyNewlines($value ?? ''))); \uasort($values, 'strnatcmp'); static $identifiers = [];