Hi there. After upgrading the module to 7.x-4.9, I'm getting this error on both my local Windows Drupal install, and one running on the remote server under Ubuntu:

Fatal error: Unsupported operand types in /sites/all/libraries/mailchimp/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 375

I've tried going back to 1.0.4 of the MailChimp library, in case that's the issue, but the fatal error still pops up. This happens whenever I try to access the list or sign up forms admin pages, or submitting the sign up form. :(

Comments

Ambient.Impact created an issue. See original summary.

bessone’s picture

Same to me, you need to update the Mailchimp library as said in changelog: https://www.drupal.org/project/mailchimp/releases/7.x-4.9

With v 1.0.8 of Mailchimp library everythings works fine.

jon_the_eye’s picture

I had this issue, but at a different line number in CurlFactory.php

This error broke every page on the public Drupal site, with a number of admin pages broken as well. Everything was fine until I turned on the Google reCaptcha module, which as of itself, was not the issue, it was writing/saving the options.

This is the code block, with my error on line 390:

if (isset($options['timeout'])) {
            $timeoutRequiresNoSignal |= $options['timeout'] < 1;
            $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
        }

From what I can see, in 7.x-4.9, "$options['timeout']" has become an array, if you try and multiply an array by a 1000, you might get an operand error!

My workaround was to hard-code the cURL timeout to 6 seconds, although there is probably a more sophisticated fix for this.

$conf[CURLOPT_TIMEOUT_MS] = 6000 ;

karolus’s picture

I can also attest that the solution @jon_the_eye put up in #3 worked.

Since the site I'm on is going to be upgraded to D8, hard coding this fix is fine for the moment. It should be addressed for those continuing to work with D7, though.

karolus’s picture

sillo’s picture

1 year later. still no update from the maintainer.

Sorry, not to sound ungrateful or like a douche, but a bug (appearantly with a user contributed solution) that has been reported for over a year and still not fixed, is what is killing Drupal. There is just too many dead and abandonned modules.

wylbur’s picture

I encountered the error listed in the issue summary. Updating to the latest version of the Mailchimp library resolved the issue completely for me.

Perhaps the issue described in comment #3 is another unrelated issue?

We're using version 7.x-4.11, so this probably applies to all versions AFTER 7.x-4.9.

milos.kroulik’s picture

I can confirm that updating Mailchimp library to version 1.0.10 seems to have resolved the issue.

Ambient.Impact’s picture

Status: Active » Fixed

I can also confirm that updating to version 1.0.10 of the library, along with the latest updates to this module does indeed fix this issue!

@sillo Considering you have no commits or issues credited to you, you don't seem to be helping pitch in to fix this perceived issue; the Drupal community thrives on people helping out with this or that. As far as I can tell, Drupal and its ecosystem are doing pretty well and are quite active - yes, some modules and themes get left behind, but the same happens for any other large CMS, like WordPress.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.