Skip to content

Commit d4a79d6

Browse files
committed
updated files
1 parent 35e04e1 commit d4a79d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Model/Mautic/Contact.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ public function mappingContactData(array $data = [])
250250
public function getRequestData(array $data = [], $customer = null)
251251
{
252252
if ($customer) {
253-
try {
254-
$customerData = $customer->getData();
255-
} catch (\Exception $e) {
253+
if ($customer instanceof \Magento\Customer\Model\Data\Customer) {
256254
$customerData = $customer->__toArray();
255+
} else {
256+
$customerData = $customer->getData();
257257
}
258258
$address = $this->_getCustomerAddress($customer);
259259
if ($address) {

0 commit comments

Comments
 (0)