Ticket #21212: 21212-utf8mb4.3.diff
| File 21212-utf8mb4.3.diff, 910 bytes (added by , 14 years ago) |
|---|
-
wp-includes/wp-db.php
545 545 * @param string $collate The collation (optional) 546 546 */ 547 547 function set_charset($dbh, $charset = null, $collate = null) { 548 if ( $this->has_cap( 'utf8mb4' ) ) { 549 if ( 'utf8' == $this->charset ) 550 $this->charset = 'utf8mb4'; 551 552 if ( strpos( $this->charset, 'utf8_' ) === 0 ) 553 $this->charset = str_replace( 'utf8_', 'utf8mb4_', $this->charset ); 554 } 555 548 556 if ( !isset($charset) ) 549 557 $charset = $this->charset; 550 558 if ( !isset($collate) ) … … 1575 1583 return version_compare( $version, '4.1', '>=' ); 1576 1584 case 'set_charset' : 1577 1585 return version_compare($version, '5.0.7', '>='); 1586 case 'utf8mb4': 1587 return version_compare($version, '5.5.3', '>='); 1578 1588 }; 1579 1589 1580 1590 return false;