PHP 8.1 compatibility. Passing null to the parameter without set the mailchimp_rules_api_key variable

Created on 13 November 2023, about 1 year ago
Updated 14 November 2023, about 1 year ago

Problem/Motivation

Using PHP 8.1 we have an issue when we don't have the value for the mailchimp_rules_api_key variable.

Steps to reproduce

  1. Install the module on the Drupal site using PHP 8.1
  2. Create a rule with the module
  3. Trigger the rule, the mailchimp_rules_api_key Drupal variable should not be available.

Error:

explode(): Passing null to parameter #2 ($string) of type string is deprecated in [libraries]/vendor/thinkshout/mailchimp-api-php/src/Mailchimp.php line 302

Proposed resolution

Send the only string-converted API key to the Mailchimp.

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine tibezh

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024