Skip to content

Commit e051c6e

Browse files
committed
Merge pull request #16 from th3fallen/patch-3
Update EngagePod.php
2 parents e08e310 + 6010945 commit e051c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Silverpop/EngagePod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ public function removeContact($databaseID, $email, $customer_id) {
192192
* Add a contact to a list
193193
*
194194
*/
195-
public function addContact($databaseID, $updateIfFound, $columns, $contactListID = '', $sendAutoReply = false) {
195+
public function addContact($databaseID, $updateIfFound, $columns, $contactListID = false, $sendAutoReply = false) {
196196
$data["Envelope"] = array(
197197
"Body" => array(
198198
"AddRecipient" => array(
199199
"LIST_ID" => $databaseID,
200200
"CREATED_FROM" => 1, // 1 = created manually, 2 = opted in
201201
"SEND_AUTOREPLY" => ($sendAutoReply ? 'true' : 'false'),
202202
"UPDATE_IF_FOUND" => ($updateIfFound ? 'true' : 'false'),
203-
"CONTACT_LISTS" => array("CONTACT_LIST_ID" => $contactListID),
203+
"CONTACT_LISTS" => ($contactListID) ? array("CONTACT_LIST_ID" => $contactListID) : '',
204204
"COLUMN" => array(),
205205
),
206206
),

0 commit comments

Comments
 (0)