Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2149753-mailchimp-warning.patch | 742 bytes | Pedro Lozano |
Comments
Comment #1
SchwebDesign CreditAttribution: SchwebDesign commentedor woudl be be better to change the function definition to:
i'm not sure if that's syntactically correct
Comment #2
SchwebDesign CreditAttribution: SchwebDesign commentedComment #3
Pedro Lozano CreditAttribution: Pedro Lozano commentedI think your first option was better with some modification. See patch.
Comment #4
nrackleff CreditAttribution: nrackleff commented“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!”