Loading modules/flexmail_webform/src/Plugin/WebformHandler/FlexmailWebformHandler.php +5 −3 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ class FlexmailWebformHandler extends FlexmailWebformHandlerBase { // Check first if contact with this email exists. $contacts = $flexmailManager->getContactWithEmail($submission_email); if (empty($contacts)) { if ((empty($contacts)) || (isset($contacts['total']) && $contacts['total'] === 0)) { // Create contact. $newContact = new Contact( $submission_email, Loading @@ -189,8 +189,10 @@ class FlexmailWebformHandler extends FlexmailWebformHandlerBase { } else { // Check if the custom fields need to be updated. $contactArray = \reset($contacts); $contactArray = isset($contacts['_embedded']['item']) ? \reset($contacts['_embedded']['item']) : false; if ($contactArray) { $contact_id = $contactArray['id']; } if ($this->doWeUpdateExistingContacts()) { $updateContact = $contactArray; Loading Loading
modules/flexmail_webform/src/Plugin/WebformHandler/FlexmailWebformHandler.php +5 −3 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ class FlexmailWebformHandler extends FlexmailWebformHandlerBase { // Check first if contact with this email exists. $contacts = $flexmailManager->getContactWithEmail($submission_email); if (empty($contacts)) { if ((empty($contacts)) || (isset($contacts['total']) && $contacts['total'] === 0)) { // Create contact. $newContact = new Contact( $submission_email, Loading @@ -189,8 +189,10 @@ class FlexmailWebformHandler extends FlexmailWebformHandlerBase { } else { // Check if the custom fields need to be updated. $contactArray = \reset($contacts); $contactArray = isset($contacts['_embedded']['item']) ? \reset($contacts['_embedded']['item']) : false; if ($contactArray) { $contact_id = $contactArray['id']; } if ($this->doWeUpdateExistingContacts()) { $updateContact = $contactArray; Loading