Skip to content

fix: ensure current user lists are initialized as an empty array#2043

Merged
miguelpeixe merged 1 commit intoreleasefrom
hotfix/memberships-guard-user-lists
Mar 3, 2026
Merged

fix: ensure current user lists are initialized as an empty array#2043
miguelpeixe merged 1 commit intoreleasefrom
hotfix/memberships-guard-user-lists

Conversation

@miguelpeixe
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Newspack_Newsletters_Subscription::get_contact_lists( $user_email ) can return a WP_Error, which will throw an exception if used as an argument in array_diff().

How to test the changes in this Pull Request:

Just make sure nothing stands out in the code.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@miguelpeixe miguelpeixe self-assigned this Mar 3, 2026
@miguelpeixe miguelpeixe requested a review from a team as a code owner March 3, 2026 20:26
@miguelpeixe miguelpeixe changed the base branch from trunk to release March 3, 2026 20:27
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🎉 This PR is included in version 3.28.6-hotfix-memberships-guard-user-lists.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @miguelpeixe! 🚢

@github-actions github-actions bot added [Status] Approved Ready to merge and removed [Status] Needs Review labels Mar 3, 2026
@miguelpeixe miguelpeixe merged commit 0afb1c6 into release Mar 3, 2026
18 checks passed
@miguelpeixe miguelpeixe deleted the hotfix/memberships-guard-user-lists branch March 3, 2026 20:38
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Hey @miguelpeixe, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Mar 3, 2026
## [3.28.6](v3.28.5...v3.28.6) (2026-03-03)

### Bug Fixes

* ensure current user lists are initialized as an empty array if not an array ([#2043](#2043)) ([0afb1c6](0afb1c6))
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🎉 This PR is included in version 3.28.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Approved Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants