Make WordPress Core

Ticket #31771: 31771.diff

File 31771.diff, 627 bytes (added by pento, 10 years ago)
  • src/wp-includes/wp-db.php

     
    22192219                foreach ( $columns as $column ) {
    22202220                        if ( ! empty( $column->Collation ) ) {
    22212221                                list( $charset ) = explode( '_', $column->Collation );
     2222
     2223                                // If the current connection can't support utf8mb4 characters, let's only send 3-byte utf8 characters.
     2224                                if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) {
     2225                                        $charset = 'utf8';
     2226                                }
     2227
    22222228                                $charsets[ strtolower( $charset ) ] = true;
    22232229                        }
    22242230