Problem/Motivation

_mailchimp_lists_subscription_has_changed() uses the output of MailchimpListsSubscription::getInterestGroups() unconditionally as input for a foreach loop. MailchimpListsSubscription::getInterestGroups() however can return NULL.

Proposed resolution

Make MailchimpListsSubscription::getInterestGroups() to always return an array

API changes

MailchimpListsSubscription::getInterestGroups() now returns an empty array instead of NULL if no interest groups were saved for a subscription.

Data model changes

None

CommentFileSizeAuthor
#6 3194699-6.patch2.08 KBbsztreha
#2 3194699-2.patch2.26 KBcasey

Issue fork mailchimp-3194699

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

casey created an issue. See original summary.

casey’s picture

Status: Needs work » Needs review
StatusFileSize
new2.26 KB
gcb’s picture

Assigned: Unassigned » spncr
gcb’s picture

Version: 8.x-1.x-dev » 2.x-dev

Patch no longer applies to head of 2.x

gcb’s picture

Status: Needs review » Needs work
bsztreha’s picture

Status: Needs work » Needs review
StatusFileSize
new2.08 KB

Updated with latest 2.x branch

  • xenophyle committed a746b591 on 2.x authored by bsztreha
    Issue #3194699 by casey, bsztreha, Rob230: MailchimpListsSubscription::...

xenophyle credited Rob230.

xenophyle’s picture

Assigned: spncr » Unassigned
Status: Needs review » Fixed
Related issues: +#3357696: New interest groups can be NULL

Status: Fixed » Closed (fixed)

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

dabley made their first commit to this issue’s fork.