From d1641400ef421a476bebb7e065234b7567a0cef5 Mon Sep 17 00:00:00 2001 From: Gwildor Sok Date: Sun, 19 May 2024 17:25:15 +0200 Subject: [PATCH] [160] Fix error when saving member without email or birthday --- src/Entity/MemberDetailsRevision.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Entity/MemberDetailsRevision.php b/src/Entity/MemberDetailsRevision.php index 3120bc3..b6c6688 100644 --- a/src/Entity/MemberDetailsRevision.php +++ b/src/Entity/MemberDetailsRevision.php @@ -42,8 +42,8 @@ class MemberDetailsRevision { /** @ORM\Column(type="string", length=100) */ private string $lastName; - /** @ORM\Column(type="string", length=200) */ - private string $email; + /** @ORM\Column(type="string", length=200, nullable=true) */ + private ?string $email = null; /** @ORM\Column(type="string", length=20) */ private string $phone; @@ -102,7 +102,7 @@ public function hasChanged(Member $member) { || $this->getPostCode() !== $member->getPostCode() || $this->getCountry() !== $member->getCountry() || $this->getCurrentMembershipStatus() !== $member->getCurrentMembershipStatus() - || $this->getDateOfBirth()->format('Ymd') !== $member->getDateOfBirth('Ymd'); + || $this->getDateOfBirth() !== $member->getDateOfBirth(); } public function getId(): ?int { return $this->id; } @@ -115,7 +115,7 @@ public function getAddress(): string { return $this->address; } public function getCity(): string { return $this->city; } public function getPhone(): string { return $this->phone; } public function getIban(): ?string { return $this->iban; } - public function getEmail(): string { return $this->email; } + public function getEmail(): ?string { return $this->email; } public function getPostCode(): string { return $this->postCode; } public function getCountry(): string { return $this->country; } public function getDateOfBirth(): ?DateTime { return $this->dateOfBirth; }