Changeset 38581 for branches/4.6
- Timestamp:
- 09/08/2016 11:53:25 PM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-includes/wp-db.php
r38442 r38581 778 778 if ( 'utf8' === $charset && $this->has_cap( 'utf8mb4' ) ) { 779 779 $charset = 'utf8mb4'; 780 } 781 782 if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) { 783 $charset = 'utf8'; 784 $collate = str_replace( 'utf8mb4_', 'utf8_', $collate ); 780 785 } 781 786 -
branches/4.6/tests/phpunit/tests/db.php
r37602 r38581 1030 1030 $this->assertSame( 'utf8mb4_swedish_ci', $result['collate'] ); 1031 1031 } 1032 1033 /** 1034 * @ticket 37982 1035 */ 1036 function test_charset_switched_to_utf8() { 1037 global $wpdb; 1038 1039 if ( $wpdb->has_cap( 'utf8mb4' ) ) { 1040 $this->markTestSkipped( 'This test requires utf8mb4 to not be supported.' ); 1041 } 1042 1043 $charset = 'utf8mb4'; 1044 $collate = 'utf8mb4_general_ci'; 1045 1046 $result = $wpdb->determine_charset( $charset, $collate ); 1047 1048 $this->assertSame( 'utf8', $result['charset'] ); 1049 $this->assertSame( 'utf8_general_ci', $result['collate'] ); 1050 } 1032 1051 }
Note: See TracChangeset
for help on using the changeset viewer.