fix trimming for email in person / thirdparty

This commit is contained in:
Julien Fastré 2022-03-31 12:51:53 +02:00
parent f47fb17b8d
commit c7762dd6d2
2 changed files with 2 additions and 9 deletions

View File

@ -1568,13 +1568,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
public function setEmail(?string $email): self
{
if (null === $email) {
$email = '';
}
$email = trim($email);
$this->email = $email;
$this->email = trim((string) $email);
return $this;
}

View File

@ -762,8 +762,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
*/
public function setEmail($email = null)
{
$email = trim($email);
$this->email = $email;
$this->email = trim((string) $email);
return $this;
}