See https://www.woltlab.com/community/thread/301317-error-trying-to-upload-an-avatar-by-acp/
<dl class="avatarType jsOnly{if $errorType[customAvatar]|isset} formError{/if}" id="avatarUpload">
<dt>
- {if $avatarType == 'custom'}
+ {if $avatarType == 'custom' && $userAvatar !== null}
{@$userAvatar->getImageTag(96)}
{else}
<img src="{@$__wcf->getPath()}images/avatars/avatar-default.svg" alt="" class="userAvatarImage icon96">
parent::readData();
// get the avatar object
- if ($this->avatarType == 'custom') {
+ if ($this->avatarType == 'custom' && $this->user->avatarID) {
$this->userAvatar = new UserAvatar($this->user->avatarID);
}