Skip to content

Commit

Permalink
fix: wp_mail, concat "to", "cc", "bcc" avec virgule sans espace (semb…
Browse files Browse the repository at this point in the history
…le perturber cette version de WordPress ou hébergeur ou WordFence)
  • Loading branch information
sharevb committed Nov 9, 2024
1 parent d0f26c2 commit f130657
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions amapress.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Amapress
* Plugin URI: https://github.com/comptoirdesappli/amapress
* Description: Plugin de Gestion & Communication pour les AMAP
* Version: 0.99.283
* Version: 0.99.285
* Requires PHP: 5.6
* Requires at least: 4.6
* Author: Comptoir des Applis
Expand Down Expand Up @@ -53,7 +53,7 @@
define( 'AMAPRESS__PLUGIN_FILE', __FILE__ );
define( 'AMAPRESS_DELETE_LIMIT', 100000 );
define( 'AMAPRESS_DB_VERSION', 112 );
define( 'AMAPRESS_VERSION', '0.99.283' );
define( 'AMAPRESS_VERSION', '0.99.285' );
define( 'AMAPRESS_MAIL_QUEUE_DEFAULT_INTERVAL', 60 );
define( 'AMAPRESS_MAIL_QUEUE_DEFAULT_LIMIT', 4 );

Expand Down Expand Up @@ -129,7 +129,7 @@ function amapress_wp_mail( $to, $subject, $message, $headers = '', $attachments
return false;
}
if ( is_array( $to ) ) {
$to = implode( ', ', $to );
$to = implode( ',', $to );
}
if ( empty( $headers ) ) {
$headers = array();
Expand All @@ -156,7 +156,7 @@ function ( $h ) {
return 0 !== stripos( $h, 'Cc' );
} );
if ( is_array( $cc ) ) {
$headers[] = 'Cc:' . implode( ', ', $cc );
$headers[] = 'Cc:' . implode( ',', $cc );
} else {
$headers[] = 'Cc:' . $cc;
}
Expand All @@ -167,7 +167,7 @@ function ( $h ) {
return 0 !== stripos( $h, 'Bcc' );
} );
if ( is_array( $bcc ) ) {
$headers[] = 'Bcc:' . implode( ', ', $bcc );
$headers[] = 'Bcc:' . implode( ',', $bcc );
} else {
$headers[] = 'Bcc:' . $bcc;
}
Expand Down

0 comments on commit f130657

Please sign in to comment.