Skip to content

Commit

Permalink
[160] Fix error when saving member without email or birthday (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwildor authored May 19, 2024
1 parent 184c4b0 commit 7a160fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Entity/MemberDetailsRevision.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down

0 comments on commit 7a160fb

Please sign in to comment.