fix Cannot access protected property id (#3506)

This commit is contained in:
bfzgaier
2025-10-30 09:27:58 +01:00
committed by Yuri Kuznetsov
parent 86215d0094
commit 90d7b99936
@@ -114,7 +114,7 @@ class Erasor implements
$this->emailAddressAccessChecker
->checkEdit($this->user, $emailAddress, $entity)
) {
$emailAddress->set(Field::NAME, 'ERASED:' . $emailAddress->id);
$emailAddress->set(Field::NAME, 'ERASED:' . $emailAddress->getId());
$emailAddress->set('optOut', true);
$this->entityManager->saveEntity($emailAddress);
}
@@ -132,7 +132,7 @@ class Erasor implements
$this->phoneNumberAccessChecker
->checkEdit($this->user, $phoneNumber, $entity)
) {
$phoneNumber->set(Field::NAME, 'ERASED:' . $phoneNumber->id);
$phoneNumber->set(Field::NAME, 'ERASED:' . $phoneNumber->getId());
$this->entityManager->saveEntity($phoneNumber);
}