Bugfix: Call to a member function SmtpSettings() on null #1664

This commit is contained in:
the-djmaze 2024-07-14 14:21:55 +02:00
parent 95436347e5
commit dc49a00f5f

View file

@ -45,7 +45,7 @@ abstract class Account implements \JsonSerializable
public function SmtpUser() : string
{
return $this->sSmtpUser ?: $this->oDomain->SmtpSettings()->fixUsername($this->sEmail);
return $this->sSmtpUser ?: ($this->oDomain ? $this->oDomain->SmtpSettings()->fixUsername($this->sEmail) : '');
// return $this->sSmtpUser ?: $this->sEmail ?: $this->sImapUser;
}