From: Cyperghost Date: Wed, 24 Jan 2024 12:56:07 +0000 (+0100) Subject: `$attachmentHandler` can not be null X-Git-Tag: 6.0.7_dev_1~4^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3691feda6dae7aca2d745882b73369c78762509f;p=GitHub%2FWoltLab%2FWCF.git `$attachmentHandler` can not be null --- 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