WordPress.org

Make WordPress Core

Ticket #37982: 37982.diff

File 37982.diff, 573 bytes (added by pento, 3 years ago)
  • src/wp-includes/wp-db.php

     
    779779                        $charset = 'utf8mb4';
    780780                }
    781781
     782                if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) {
     783                        $charset = 'utf8';
     784                        $collate = str_replace( 'utf8mb4_', 'utf8_', $collate );
     785                }
     786
    782787                if ( 'utf8mb4' === $charset ) {
    783788                        // _general_ is outdated, so we can upgrade it to _unicode_, instead.
    784789                        if ( ! $collate || 'utf8_general_ci' === $collate ) {