Running on a host that has php 5.2.17. Mailchim is configured to display interest groups on the registration form. This causes php warnings in check_plain() in bootstrap.inc when it does the following:

 if ($php525) {
    return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
  }

I tracked this down to _mailchimp_interest_groups_element() adding an empty array for the default element. I'm not sure if this is a mailchimp coding issue or a bug in the forms api but I worked around it by changing the interests groups form element to

       $element['interest_groups_' . $list_id][$group['id']] = array(
          '#type' => $field_type,
          '#title' => t('@name', array('@name' => $group['name'])),
          '#multiple' => FALSE,
          '#options' => $options
        );
        // adding an empty default value causes form api to generate
        // php warnings by passing an array to check_plain
        if (!empty($default)) {
            $element['interest_groups_' . $list_id][$group['id']]['#default_value'] = $default;
            
        }

I'm attaching a patch that fixes this issue.

CommentFileSizeAuthor
mailchimp.module.patch1.25 KBbkat
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nrackleff’s picture

Issue summary: View changes
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!”