diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 3f9304c711..6ecd672706 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -517,9 +517,11 @@ if ( ! function_exists( 'wp_mail' ) ) : } if ( ! empty( $attachments ) ) { - foreach ( $attachments as $attachment ) { + foreach ( $attachments as $filename => $attachment ) { + $filename = is_string( $filename ) ? $filename : ''; + try { - $phpmailer->addAttachment( $attachment ); + $phpmailer->addAttachment( $attachment, $filename ); } catch ( PHPMailer\PHPMailer\Exception $e ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index b3dd239c85..bb6c9152fd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55029'; +$wp_version = '6.2-alpha-55030'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.