From 3691feda6dae7aca2d745882b73369c78762509f Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 24 Jan 2024 13:56:07 +0100 Subject: [PATCH] `$attachmentHandler` can not be null --- .../files/lib/acp/form/UserAddForm.class.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php index f7854adaaa..b538d04591 100644 --- a/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserAddForm.class.php @@ -128,7 +128,7 @@ class UserAddForm extends UserOptionListForm * @var array */ public $optionTree = []; - public ?AttachmentHandler $attachmentHandler; + public AttachmentHandler $attachmentHandler; public int $attachmentObjectID = 0; public string $attachmentObjectType = 'com.woltlab.wcf.user.signature'; public array $defaultSmilies = []; @@ -448,14 +448,12 @@ class UserAddForm extends UserOptionListForm */ public function readData() { - if ($this->attachmentObjectType) { - $this->attachmentHandler = new AttachmentHandler( - $this->attachmentObjectType, - $this->attachmentObjectID, - $this->tmpHash, - 0 - ); - } + $this->attachmentHandler = new AttachmentHandler( + $this->attachmentObjectType, + $this->attachmentObjectID, + $this->tmpHash, + 0 + ); parent::readData(); // get default smilies -- 2.20.1