The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

API cc_class showing errors suddenly..

Highlighted
Occasional Participant

API cc_class showing errors suddenly..

I'm about to go live and suddenly getting cc_class errors and my contacts are not being added to list.  Please advice asap as I'm about to go live with new website.

 


Warning: Invalid argument supplied for foreach() in /home/xxxxx/public_html/xxxxx//html/includes/lib/constantcontact/cc_class.php on line 156

 

Warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/xxxxx//html/includes/lib/constantcontact/cc_class.php on line 168

 

No code has changed and it has been working fine for several weeks.  Did you change the base version of this code that is creating these errors?

 

This is my test site but my prodution url/domain is giving same error.

Thanks.

 

 


4 REPLIES 4
Highlighted
Employee

Re: API cc_class showing errors suddenly..

These are warnings rather than errors, and have been happening in the PHP sample for a while, depending on what call you are making and what data is being returned. It appears that the two warnings that you posted are retrieving lists from your account, as well as any 'links' contained in the lists collection (link to the next page of lists perhaps). This should not however prevent any functionality from completing as they are not fatal errors.  Typically, I would recommend that you turn error messaging off in a production enviornment anyway which can be done by using:

 

error_reporting(0);

 

at the top of you page. You can also set this globally in your php.ini file.

 

As our API's have not been updated, If your error message settings are the same in your development or production environments, then the change must be the account data being returned. If this is not adding any contacts to your account, I would need to see:

1) your account name

2) an example email address that is not being added

3) the code you are using to add the contact.

 

You can either reply to this thread with that information, or send it over to our webservices team, and we'll be happy to take a look. Thanks!

David J

Highlighted
Occasional Participant

Re: API cc_class showing errors suddenly..

Hi - I've sent email with the information. Thanks.

Highlighted
Employee

Re: API cc_class showing errors suddenly..

I just wanted to respond and let you know I have received your email, and will respond as soon as I've got any news for you. In the mean time, if you have any other questions please let me know. Thanks!

David J

Highlighted
Occasional Participant

Re: API cc_class showing errors suddenly..

Ok.  Thanks.  Let me know if you need anything else.  I will continue to research on my end.  I'm sending you copy of my cc_class.php file as well.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured