Hello!

after upgrading server to PHP 5.4 we were getting this error:

Creating default object from empty value in /home/winningb/public_html/sites/all/modules/mailchimp/mailchimp.module on line 23.

to fix i changed mailchimp.module line 23 from:

    $account->roles = array(2 => 'authenticated');

to

  	if(empty($account)){
  		$account = new stdClass();
  	}
    $account->roles = array(2 => 'authenticated');

Hope this helps someone else... or please share if there's a better way to fix this.

CommentFileSizeAuthor
#3 2149753-mailchimp-warning.patch742 bytesPedro Lozano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SchwebDesign’s picture

or woudl be be better to change the function definition to:

function mailchimp_user($op, &$edit, &$account = new stdClass(), $category = NULL) { 

i'm not sure if that's syntactically correct

SchwebDesign’s picture

Issue summary: View changes
Pedro Lozano’s picture

I think your first option was better with some modification. See patch.

nrackleff’s picture

Status: Active » Closed (won't fix)

“And now our watch [for support of the 6.x version of the MailChimp module] has ended…” With the end of Drupal 6 support, I’m sad to say we too must turn the page.

Fret not! The 7.x-4.x and 8.x versions come highly recommended. Both are using Mailchimp’s new API 3.0 and are being actively maintained. “What is dead may never die, but rises again, harder and stronger!”