500 error using Mailchimp action
-
In PHP 8.1, if I use the Mailchimp action, and submit a form with a group of checkboxes, the is_email() check fails when $value is an array of checkboxes values.
html-forms/src/actions/class-mailchimp.php:80
// find email field
foreach ( $submission->data as $field => $value ) {
if ( is_email( $value ) ) {
$email_address = $value;
}
}Using is_string() function as part of the check should fix it:
// find email field
foreach ( $submission->data as $field => $value ) {
if ( is_string( $value ) && is_email( $value ) ) {
$email_address = $value;
}
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.