Skip to content

Commit bcb1366

Browse files
committed
Recent versions of MySQL and MariaDB now report utf8mb3 instead of the old utf8 old alias
1 parent 96c72fb commit bcb1366

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4843,7 +4843,7 @@ function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true )
48434843
if ( isset( $data[ $emoji_field ] ) ) {
48444844
$charset = $wpdb->get_col_charset( $wpdb->posts, $emoji_field );
48454845

4846-
if ( 'utf8' === $charset ) {
4846+
if ( 'utf8' === $charset || 'utf8mb3' === $charset ) {
48474847
$data[ $emoji_field ] = wp_encode_emoji( $data[ $emoji_field ] );
48484848
}
48494849
}

0 commit comments

Comments
 (0)