Skip to content

Commit 389813a

Browse files
author
B24io
committed
task#4858 fix contact formatter error
1 parent 41d9fbe commit 389813a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# loyalty-php-sdk
2+
## 0.1.3 (6.08.2019)
3+
* fix contact formatter error
4+
25
## 0.1.2 (5.08.2019)
36
* add transport `Bitrix24\Contacts\Transport\Admin`
47

src/Bitrix24/Contacts/Formatters/Contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static function toArray(Contacts\DTO\Contact $contact): array
3232
$contact->getMobilePhone()->getCountryCode(),
3333
$contact->getMobilePhone()->getNationalNumber()
3434
),
35-
'email' => (string)$contact->getEmail(),
35+
'email' => $contact->getEmail() !== null ? (string)$contact->getEmail() : null,
3636
'address' => $contact->getAddress() !== null ? $contact->getAddress()->toArray() : null,
3737
'origin_id' => $contact->getOriginId(),
3838
'originator_id' => $contact->getOriginatorId(),

0 commit comments

Comments
 (0)