From 244e2e8d86427c86a46a80457db9e96751480da9 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 28 Jul 2018 20:45:46 +0200 Subject: [PATCH] Allow empty email --- Account/Account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Account/Account.php b/Account/Account.php index 2cba85883..5c53f8cc7 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -453,11 +453,11 @@ class Account implements ArrayableInterface, \JsonSerializable */ public function setEmail(string $email) : void { - if (!Email::isValid($email)) { + if ($email !== '' && !Email::isValid($email)) { throw new \InvalidArgumentException(); } - $this->email = mb_strtolower($email); + $this->email = \mb_strtolower($email); } /**