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');
|
$contactNode = $node->filterXPath('//kommunikation');
|
||||||
|
|
||||||
if (0 < $contactNode->count()) {
|
if (0 < $contactNode->count()) {
|
||||||
$communication = new Communication();
|
$personalData->communication->phone = $this->getStringOrNullValue($contactNode->filterXPath('//telefonprivat'));
|
||||||
$communication->phone = $this->getStringOrNullValue($contactNode->filterXPath('//telefonprivat'));
|
$personalData->communication->mobile = $this->getStringOrNullValue($contactNode->filterXPath('//telefonmobil'));
|
||||||
$communication->mobile = $this->getStringOrNullValue($contactNode->filterXPath('//telefonmobil'));
|
$personalData->communication->email = $this->getStringOrNullValue($contactNode->filterXPath('//email'));
|
||||||
$communication->email = $this->getStringOrNullValue($contactNode->filterXPath('//email'));
|
$personalData->communication->newsletter = $this->getBoolValue($contactNode->filterXPath('//newsletter'));
|
||||||
$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;
|
return $personalData;
|
||||||
|
|||||||
Reference in New Issue
Block a user