From 675ba90280e61b471dd4a77e39bcc724cd8c0009 Mon Sep 17 00:00:00 2001 From: Nicolaas / Sunny Side Up Date: Fri, 12 May 2023 10:20:56 +1200 Subject: [PATCH] FIX fix issue where member without valid email can not be saved It is possible to have a member record without a valid email address. In this case, you can not save Member as it throws an error (email is tried being sent without a valid email address). --- src/Security/Member.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Security/Member.php b/src/Security/Member.php index c6ec8d763..9ac90a456 100644 --- a/src/Security/Member.php +++ b/src/Security/Member.php @@ -774,7 +774,7 @@ class Member extends DataObject if ((Director::isLive() || Injector::inst()->get(MailerInterface::class) instanceof TestMailer) && $this->isChanged('Password') && $this->record['Password'] - && $this->Email + && Email::is_valid_address($this->Email ?? '') && static::config()->get('notify_password_change') && $this->isInDB() ) {