Fix PHP 8.1 compatibility in AbstractCategoryEditForm for NULL description
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 24 Feb 2023 14:20:12 +0000 (15:20 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 24 Feb 2023 14:20:12 +0000 (15:20 +0100)
see #5323

wcfsetup/install/files/lib/acp/form/AbstractCategoryEditForm.class.php

index 9e2f5ef514fad004c2f4737683bdc390bdf88e2a..6b36cd152ade670ddcdaa39be464c1005ce16eeb 100644 (file)
@@ -115,7 +115,7 @@ abstract class AbstractCategoryEditForm extends AbstractCategoryAddForm
                 I18nHandler::getInstance()->setOptions(
                     'description',
                     $this->packageID,
-                    $this->category->description,
+                    $this->category->description ?: '',
                     $this->objectType->getProcessor()->getI18nLangVarPrefix() . '.description.category\d+'
                 );
             }