Skip to content

Commit

Permalink
Don't store 4-byte UTF-8 characters in MySQL 3-byte utf8 encoding
Browse files Browse the repository at this point in the history
Fixes #23549
  • Loading branch information
atrol committed Mar 14, 2018
1 parent 9debbfb commit 42e57d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/email_queue_api.php
Expand Up @@ -111,8 +111,9 @@ function email_queue_add( EmailData $p_email_data ) {
}

$c_email = $t_email_data->email;
$c_subject = $t_email_data->subject;
$c_body = $t_email_data->body;
# MySQL 4-bytes UTF-8 chars workaround #21101
$c_subject = db_mysql_fix_utf8( $t_email_data->subject );
$c_body = db_mysql_fix_utf8( $t_email_data->body );
$c_metadata = serialize( $t_email_data->metadata );

db_param_push();
Expand Down

0 comments on commit 42e57d4

Please sign in to comment.