Unknown named parameter $tags

Created on 7 April 2023, over 1 year ago
Updated 18 January 2024, 8 months ago

Problem/Motivation

PHP 8.0, mailchimp_update_member_process being called via the queue fails because the tags argument is not defined. Not overly familiar with these methods, but from the queue item data it seems it should be an array - unlike the mailchimp_subscribe_process function.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

General

Created by

πŸ‡΅πŸ‡ͺPeru krystalcode

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @krystalcode
  • @krystalcode opened merge request.
  • πŸ‡¦πŸ‡ΊAustralia ac Perth

    MR fixes this issue.

  • Status changed to Needs work 10 months ago
  • πŸ‡³πŸ‡±Netherlands megachriz

    I see that the changes make sense. mailchimp_cron() will call call_user_func_array() with named arguments and one of the named arguments - $tags - is not defined currently in mailchimp_update_member_process().

    I do think we need to do a little bit more. mailchimp_update_member_process() doesn't do anything with the $tags parameter now. So I think that the code should make a call to addTagsMember() when $tags is not empty. Also, $tags probably need to passed when mailchimp_update_member_process() is called in the same function again (Β± line 707):

    return mailchimp_update_member_process($list_id, $email, $merge_vars, $interests, $format, TRUE, $gdpr_consent);
    
  • Status changed to Closed: duplicate 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States xenophyle
  • πŸ‡§πŸ‡·Brazil brandonlira

    brandonlira β†’ changed the visibility of the branch 3352943-unknown-named-parameter to hidden.

  • πŸ‡§πŸ‡·Brazil brandonlira

    brandonlira β†’ changed the visibility of the branch 3352943-unknown-named-parameter to active.

Production build 0.71.5 2024