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) + fix nominatim partial empty + undef var
  • Loading branch information
sharevb committed Nov 9, 2024
1 parent d0f26c2 commit ee55dc7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 0.99.285 (2024-11-09)

* contrat vierge placeholders status quand pas de contrat papier défini
* placeholder status "total_avec/sans_don"
* Nominatim empty response and other fix
* wp_mail, concat "to", "cc", "bcc" avec virgule sans espace (semble perturber cette version de WordPress ou hébergeur
ou WordFence)

# 0.99.283 (2024-10-27)

* affichage des livraisons d'une adhésion passée

# 0.99.282 (2024-10-14)

* meilleure interface d'édition des paniers modulables
Expand Down
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
2 changes: 1 addition & 1 deletion entities/distribution/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ function ( $adh ) use ( $date, $allow_partial_coadh ) {
echo esc_html( sprintf( __( 'Responsables du jour - %s', 'amapress' ), $lieu->getTitle() ) );
echo '</h3>';
// echo '<br/>';
echo do_shortcode( '[inscription-distrib show_title=false for_emargement=true for_pdf=' . $for_pdf . ' show_past=false show_for_resp=true max_dates=1 show_adresse=false show_avatar=' . ( $for_pdf ? 0 : 1 ) . ' show_roles=false date=' . $from_date . ' lieu=' . $lieu_id . ']' );
echo do_shortcode( '[inscription-distrib show_title=false for_emargement=true for_pdf=' . $for_pdf . ' show_past=false show_for_resp=true max_dates=1 show_adresse=false show_avatar=' . ( $for_pdf ? 0 : 1 ) . ' show_roles=false date=' . $from_date . ' lieu=' . $lieu->ID . ']' );
}
}

Expand Down
2 changes: 1 addition & 1 deletion titan-framework/lib/class-option-address.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function lookup_address( $string ) {

$response = json_decode( wp_remote_retrieve_body( $request ), true );

if ( ! is_array( $response ) || empty( $response ) ) {
if ( ! is_array( $response ) || empty( $response ) || empty( $response[0] ) ) {
error_log( "Nominatim resolution failed: $details_url" );

return null;
Expand Down

0 comments on commit ee55dc7

Please sign in to comment.