Support » Plugin: Constant Contact for WordPress » Recent Update Created Error: Cannot use object of type WP_Error as array

  • I updated and got this on the top of WordPress:

    The Constant Contact plugin isn’t connected.
    Please log in to Constant Contact using the button below and your site will be connected.

    Once I login through constant contact and try to re-link the account it returns to the site with this error:

    Fatal error: Cannot use object of type WP_Error as array in /home/cmservices/public_html/wp-content/plugins/constant-contact-api/classes/class.kwsrestclient.php on line 105

    Please let me know if what I can do to fix this! Thanks.

    https://wordpress.org/plugins/constant-contact-api/

Viewing 10 replies - 1 through 10 (of 10 total)
  • I am experiencing this same issue. When I deleted and tried to re-add the plugin, then I received a response” The plugin does not have a valid header.”
    Please help…

    Plugin Author Zack Katz

    (@katzwebdesign)

    Thanks for reporting – I’m working on a fix for the next release.

    Plugin Author Zack Katz

    (@katzwebdesign)

    This should be fixed in the new release (3.1.5).

    Thread Starter walterkeener3

    (@walterkeener3)

    I now get these errors after I sign in to Constant Contact and redirect back to the site:
    Warning: Invalid argument supplied for foreach() in /home/cmservices/public_html/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php on line 30

    Warning: Invalid argument supplied for foreach() in /home/cmservices/public_html/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php on line 30

    Warning: Invalid argument supplied for foreach() in /home/cmservices/public_html/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php on line 30

    Warning: Invalid argument supplied for foreach() in /home/cmservices/public_html/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php on line 30
    Skip to main content

    Warning: trim() expects parameter 1 to be string, object given in /home/cmservices/public_html/wp-includes/formatting.php on line 371

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/cmservices/public_html/wp-includes/formatting.php on line 374

    Leo

    (@leowebdev)

    Version 3.1.6 same issue

    Catchable fatal error: Argument 1 passed to Ctct\Components\Contacts\Contact::create() must be an array, null given, called in /wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php on line 63 and defined in /wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Components/Contacts/Contact.php on line 153

    Version 3.1.6 same issue

    Catchable fatal error: Argument 1 passed to Ctct\Components\Contacts\Contact::create() must be an array, null given, called in /wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php on line 63 and defined in /wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Components/Contacts/Contact.php on line 153

    I am getting this error as well. When I place the widget at the footer of the page, it breaks the rest of the widgets after it in the code.

    I have since suspended it at smshug.org

    Error code:
    Catchable fatal error: Argument 1 passed to Ctct\Components\Contacts\ContactList::create() must be of the type array, null given, called in /home4/smshug/public_html/wordpress/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php on line 89 and defined in /home4/smshug/public_html/wordpress/wp-content/plugins/constant-contactapi/vendor/constantcontact/constantcontact/src/Ctct/Components/Contacts/ContactList.php on line 53

    Tim Derouin

    (@tderouindesign)

    I am having a similar problem…

    Catchable fatal error: Argument 1 passed to Ctct\Components\Contacts\Contact::create() must be of the type array, null given, called in /home/pdfalt2/peacedevelopmentfund.org/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php on line 122 and defined in /home/pdfalt2/peacedevelopmentfund.org/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Components/Contacts/Contact.php on line 153

    Does anyone have a solution or should I start a new thread?

    Leanne

    (@leanneheller)

    I’m receiving the same errors as walterkeener3, except that the last one references Line 379.

    The funny thing is, this is working fine on my local site, which is essentially the same as the live site.

    HeyJK

    (@heyjk)

    I am using version 3.1.6 of the plugin and was still getting the same “Catchable fatal error: Argument 1” error as many previous posts.

    In my case, I had to mess with the Form Builder so that it matched my exact specs for my previous design of the form (before the update that broke all this).

    Specifically, I had First Name, Last Name, Email and 2 checkboxes for the subscriber to choose what list(s) to join. After the update, the form builder was using a pulldown and didn’t have fields for First and Last Name.

    Once I perfectly matched what I had before (added name fields and checkboxes), it started working again.

    I hope that helps somebody. I couldn’t find any working solutions from the developer (Katz) or the Constant Contact site.

    I recently encountered this error as well.

    This appears to be an issue when your lists are “out of sync”

    For me, the solution was as simple as:
    1. Going to “Constant Contact” => “Lists” (not sure this is required, but including because it’s the steps I took).
    2. Then going to “Constant Contact” => “Form Designer”, and clicking “Save” for the form in question.

    The error is being thrown because one of the list API calls is not returning any data. By doing the steps above, it seems to reset the lists that are “valid”.

    I’m suspecting the client deleted a list, and that was the issue. Again – unsure, but the steps above worked.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Recent Update Created Error: Cannot use object of type WP_Error as array’ is closed to new replies.