From f312e1602dd6cace3c18da3589375ebbe410f996 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 4 Aug 2023 13:16:43 +0200 Subject: [PATCH] Fix the handling of `NULL` values See https://www.woltlab.com/community/thread/300917-neue-benutzergruppe-anlegen-funktioniert-nicht-mit-php-8-1x/ --- .../system/option/LineBreakSeparatedTextOptionType.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = []; -- 2.20.1