phpfui / ConstantContact

MIT License
16 stars 7 forks source link

Contact Delete Returns an error #10

Closed degive closed 2 years ago

degive commented 2 years ago

Sorry to bother you again, but I have an issue using the contact delete, here is the code: $contact_id="f30421a0-cbc8-11ec-a48c-fa163e3c5d75"; $contact= new \PHPFUI\ConstantContact\V3\Contact($client); $contact->delete($contact_id);

And here is the error returned: Fatal error: Uncaught TypeError: PHPFUI\ConstantContact\Base::doDelete(): Return value must be of type array, bool returned in /home4/rpatorg/public_html/includes/ConstantContact/src/ConstantContact/Base.php:47 Stack trace: #0 /home4/rpatorg/public_html/includes/ConstantContact/src/ConstantContact/V3/Contact.php(80): PHPFUI\ConstantContact\Base->doDelete(Array) #1 /home4/rpatorg/public_html/includes/cc_api.php(90): PHPFUI\ConstantContact\V3\Contact->delete('f30421a0-cbc8-1...') #2 /home4/rpatorg/public_html/admin/cron_cc.php(14): CCRemoveContact('f30421a0-cbc8-1...') #3 {main} thrown in /home4/rpatorg/public_html/includes/ConstantContact/src/ConstantContact/Base.php on line 47

Line 80 in contact.php is: return $this->doDelete(['contact_id' => $contact_id, ]);

Thank you for your help.

Michel.

phpfui commented 2 years ago

Yep, looks like a bug. Fix coming soon.

phpfui commented 2 years ago

Change your composer.json line to:

"phpfui/constantcontact": "dev-main",

and see if that works now. If so, close this issue and I will publish a new version.

phpfui commented 2 years ago

This should be fixed now with latest version. Open another ticket if not.

Thanks for reporting.