feat: assign default dummy email to participants without address
This commit is contained in:
@@ -156,13 +156,15 @@ class BookingParser extends AbstractParser
|
||||
$contactNode = $node->filterXPath('//kommunikation');
|
||||
|
||||
if (0 < $contactNode->count()) {
|
||||
$communication = new Communication();
|
||||
$communication->phone = $this->getStringOrNullValue($contactNode->filterXPath('//telefonprivat'));
|
||||
$communication->mobile = $this->getStringOrNullValue($contactNode->filterXPath('//telefonmobil'));
|
||||
$communication->email = $this->getStringOrNullValue($contactNode->filterXPath('//email'));
|
||||
$communication->newsletter = $this->getBoolValue($contactNode->filterXPath('//newsletter'));
|
||||
$personalData->communication->phone = $this->getStringOrNullValue($contactNode->filterXPath('//telefonprivat'));
|
||||
$personalData->communication->mobile = $this->getStringOrNullValue($contactNode->filterXPath('//telefonmobil'));
|
||||
$personalData->communication->email = $this->getStringOrNullValue($contactNode->filterXPath('//email'));
|
||||
$personalData->communication->newsletter = $this->getBoolValue($contactNode->filterXPath('//newsletter'));
|
||||
}
|
||||
|
||||
$personalData->communication = $communication;
|
||||
// assign default dummy address to ensure valid communication data
|
||||
if (empty($personalData->communication->email)) {
|
||||
$personalData->communication->email = '[email protected]';
|
||||
}
|
||||
|
||||
return $personalData;
|
||||
|
||||
Reference in New Issue
Block a user